Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi,

I am attempting to create a footer which has a list of a particular hierarchy.

The sites implementation so far looks like this
Code: Select all
Pages in Couch
index.php
cloneabletemplate.php

cloneabletemplate contains the following pages
- Page1
   - Subpage 1
- Page2
  -Subpage 2
    -SubSubpage 2
- Page 3


And so on.

Currently, all pages just embed some code which correctly generates a menu of all the pages and the correct hierarchy, however in the footer I'd like to have a list of the Pages, but not their respecting subpages or their Subsubpages, or index.php

So the correct output would be:
Code: Select all
Page1
Page2
Page3

and nothing else. How would I achieve this? I have tried root="cloneabletemplate.php" and childof="cloneabletemplate.php" but am still having the same issue.

Current code is the following:
Code: Select all
           <cms:nested_pages masterpage='cloneabletemplate.php' extended_info='1' >
           <cms:if k_level_start ><ul></cms:if>
           <cms:if k_element_start ><li>
              <cms:show k_nestedpage_title />
           </cms:if>
           <cms:if k_element_end ></li></cms:if>
           <cms:if k_level_end ></ul></cms:if>
           </cms:nested_pages>

Which displays all the pages in the hierarchy. Would appreciate any help!
Hi :)

We can use the 'depth' parameter to specify how many levels of pages to display.
So, as you wish, to show only the top level pages we need to set it to '1' as follows -
<cms:nested_pages masterpage='cloneabletemplate.php' extended_info='1' depth='1' >

Hope this helps.
2 posts Page 1 of 1