I have trouble fetching all clonable pages to display in the dropdown of the nested menu.
I currently have this:
Here is what I want to achieve:
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?
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?