Help with Menu
Posted: Sat Jun 04, 2011 10:05 pm
I have the following code for my menu displaying links for all pages of my site.
However, I would like to display only certain nodes in my menu.
For example, only pages under node id 2 and node id 3.
How do I initialize the $nodelist with these two nodes ?
Under node id 2, I have pages with IDs as follows.
2.1
2.1.1
2.1.2
2.2
2.2.1
2.3
2.4
2.4.1
2.5
Code: Select all
{if $count > 0}
<ul>
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
For example, only pages under node id 2 and node id 3.
How do I initialize the $nodelist with these two nodes ?
Under node id 2, I have pages with IDs as follows.
2.1
2.1.1
2.1.2
2.2
2.2.1
2.3
2.4
2.4.1
2.5