Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
I have trouble fetching all clonable pages to display in the dropdown of the nested menu.
I currently have this:
Code: Select all
<cms:nested_pages masterpage='index.php' extended_info='1'>
  <cms:if k_level_start>
    <cms:if k_level='0'>
      <ul>
    <cms:else/>
      <ul class="sub-menu">
    </cms:if>
  </cms:if>

  <cms:if k_element_start>
    <li id="<cms:show k_nested_page_name/>" class="<cms:if k_is_current>current</cms:if><cms:if k_total_children> contains-sub-menu</cms:if>">
    <a href="<cms:show k_menu_link/>"><cms:show k_menu_title/></a>
  </cms:if>

  <cms:if k_element_end></li></cms:if>
  <cms:if k_level_end></ul></cms:if>
</cms:nested_pages>


Here is what I want to achieve:
Code: Select all
<ul>
   <li class="current">
      <a href="page_link">page title</a>
   </li>
   <li class="contains-sub-menu">
      <a href="page_link">page title</a>
      <ul class="sub-menu">
         <li>
            <a href="cloned-page-link">cloned page title</a>
         </li>
      </ul>
   </li>
</ul>


Basically, the class contains-sub-menu should be assigned if there are any cloned pages.

Is it possible to implement? If it is, then what would be the best way to do so?
This part doesn't make sense.. no conditions plus missing cms: in cms:else.

Code: Select all
   <cms:if>
      <ul>
   </else>
      <ul class="sub-menu">
   </cms:if>
trendoman wrote: This part doesn't make sense.. no conditions plus missing cms: in cms:else.

Code: Select all
   <cms:if>
      <ul>
   </else>
      <ul class="sub-menu">
   </cms:if>


Thanks for pointing out. I initially had <cms:else/> but I made a typo when I was writing this question.
aleks wrote: Thanks for pointing out. I initially had <cms:else/> but I made a typo when I was writing this question.

Okay, but also <cms:if> is missing an argument.
trendoman wrote:
aleks wrote: Thanks for pointing out. I initially had <cms:else/> but I made a typo when I was writing this question.

Okay, but also <cms:if> is missing an argument.


I am using the reply from KK on this post - viewtopic.php?f=2&t=9353 - as a starting point to create a menu. The menu shows up correctly but cloned pages do not show up in the dropdown. For example, a template called "directory" is set to be clonable and it has multiple cloned subdirectories under it, then in the menu I add "directory" as the new menu item and point it to the template. Does it make sense to you?
I don't think I get what you are trying to do. Zip the template and I'll take a look.
6 posts Page 1 of 1
cron