Sunday 06 April 2003 3:52:51 am
Hi, I built a tree menu like this:
--Frontpage
---- Food for the soul
---- A weekend in the mountain
--Sport
--Action
--World news --Leisure
when you click on Sport, You get this:
--Frontpage
--Sport
----We did it again
----Sports weekend
--Action
--World news --Leisure
but, when you click on "We did it again" then it is like this:
--Frontpage
--Sport
--Action
--World news --Leisure
Itis because of this: {section show=eq($Folder:item.node_id,$DesignKeys:used.node)} where $Folder:item.node_id is the node_id from the "fetch" and $DesignKeys:used.node the actual used node from the page.
{section name=Folder}
{section loop=fetch(content,list,hash(parent_node_id,24, class_filter_type, "include", class_filter_array, array(1,2),sort_by,array(array(priority))))}
<tr>
<td class="path">--<a class="path" href={concat("/content/view/full/",$Folder:item.node_id,"/")|ezurl}>{$Folder:item.name}</a></td>
</tr>
{section show=eq($Folder:item.node_id,$DesignKeys:used.node)}
{section loop=fetch(content,tree,hash(parent_node_id,$DesignKeys:used.node, class_filter_type, "include", class_filter_array, array(2),sort_by,array(array(priority))))}
<tr>
<td class="path">----<a class="path" href={concat("/content/view/full/",$Folder:item.node_id,"/")|ezurl}> {$Folder:item.name}</a></td>
</tr>
{/section}
{/section}
{/section} {/section} Who to get it work or (a dream):with more depth like this without hardcoding of parent_node_id in the template:
--menu1
--menu2
----submenu1
------subsubmenu1
--------subsubsubmenu1
------subsubmenu2
----submenu2 --menu3
but only open a submenu when the parent menu is open. Any Ideas?
You can see what I want on http://www.georg-fischer.de click on Portfolio Thanks, ekke PS: I saw the wiki http://ezwiki.blanko.info/index.php/3XHT_TmplObjTree but it didn't helped me.
http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing
|