Thursday 22 April 2004 9:57:56 am
Hi there, Wondered if anyone could give me a pointer with this little conundrum... I have a treemenu which is displayed using (the documented here) code of: <div class="treenav">
<ul>
{* Set your top category here *}
{let top_cat=2 used_node=false()}
{* See if we have already a node id otherwise use the top category as current node *}
{section show=is_set($DesignKeys:used.node)}
{set used_node=$DesignKeys:used.node}
{section-else}
{set used_node=$top_cat} {/section}
{* Get a proper node object *} {let node_obj=fetch(content,node,hash(node_id,$used_node))}
{* FIRST LEVEL *}
{section loop=fetch(content,list,hash(parent_node_id,$top_cat, class_filter_type, "include", class_filter_array, array(1),sort_by,array(array(priority))))}
{section-exclude match=$:item.node_id|eq(173)} <li id="firstlevel"><a href={concat("/content/view/full/",$:item.node_id,"/")|ezurl}>{$:item.name}</a></li>
{* SECOND LEVEL *}
{section show=$node_obj.path_array|contains($:item.node_id) loop=fetch(content,list,hash(parent_node_id,$:item.node_id, class_filter_type, "include", class_filter_array, array(1),sort_by,array(array(priority))))} <li id="secondlevel">> <a href={concat("/content/view/full/",$:item.node_id,"/")|ezurl}>{$:item.name}</a></li>
{/section}
{/section}</ul>
{/let}
{/let} </div> What I want is for the menu to work exactly as it is, but I dont want the main navigation levels to send you to a page, just expand the menu - so it ends up working like you are expanding treelinks, and then picking one of the subnav (second level) elements. Basically we dont want to make section index pages! Is my explanation clear??? Any pointers would be top! Thanks, Steve.
http://www.oneworldmarket.co.uk
|