Author Topic

Håvard Bergersen

Monday 27 September 2010 12:48:31 pm

Comment62019

If you have one template for all the subpages, you could do something like this:

To create right column in subpage template:

{def $pages=fetch( 'content', 'list', hash( 'parent_node_id', 'something' ) )}

{foreach $pages as $p}
   {node_view_gui content_node=$p view=line current_node_id=$node.node_id}
{/foreach}

The lineview template

{if eq( $current_node_id, $node.node_id )}
{$node.name|wash()}
{else}
<a href={$node.url|ezurl}>{$node.name|wash()}</a>
{/if}

This should work, but there may be a cache issue.