Saturday 12 July 2003 6:23:15 am
Hello all,
I have created a subnavigation element which will get all of the child nodes to the one which you are currently viewing.
What I would like to do is if the user is further down in the site, they will be shown the second level of navigation in that section. e.g.
root
------ products
------ ------ red
------ ------ blue
------ ------ green
------ ------ ------ furry
------ ------ ------ smooth
------ contact ------ etc....
so when they are in: products >> green >> furry (or anywhere in the products section for that matter)
the subnavigation will show:
red
blue green hope this makes sense. The code I am currently using is: subnav {let folder_list=fetch( content, list, hash(parent_node_id, $node.node_id,sort_by, array( array( priority ))))} <ul>
{section name=Folder loop=$folder_list} <li><a href={concat("/",$Folder:item.url_alias)|ezroot}>{$Folder:item.name|wash}</a></li>
{/section} </ul> I am using the nice url technique (thanks Karsten), hence ezroot - The variable I need to replace is $node.node_id with the node_id for the top but one node (in this case products). Because I don't know how many levels deep the site will be, I can't just refer to the grandparent node. Any ideas?
Thanks in advance, Ben Pirt
|