List children at parent page, and get position (hierarchy)
Posted: Wed Feb 29, 2012 9:31 pm
Hi there, I need to build an index page of all children pages (of a given page), and I need to grab the position of each child so that I can use it to grab external content related to that.
Example
Page structure:
1. Portfolio
1.1 Item 1
1.2 Item 2
1.3 Item 3
I need to grab the link to that page (alrealdy done, but I can“t get the position --> 1.1 (i.e.). Have tried {$child.position} {$child.hierarchy}, but nothing prints out.
Here is the code:
Again, I need to get the position "1.1", "1.2", "1.3" of children pages and list them at parent page.
Any ideas are appreciated
Thanks!
Example
Page structure:
1. Portfolio
1.1 Item 1
1.2 Item 2
1.3 Item 3
I need to grab the link to that page (alrealdy done, but I can“t get the position --> 1.1 (i.e.). Have tried {$child.position} {$child.hierarchy}, but nothing prints out.
Here is the code:
Code: Select all
{$cgsimple->get_children('','','children')}
{if count($children)}
{foreach from=$children item='child'}
<div>
[color=#FF8040][b]{$child.hierarchy}{$child.id}[/b][/color]
{cms_selflink page=$child.alias}
</div>
{/foreach}
{/if}
Any ideas are appreciated

Thanks!