Friday 30 January 2004 2:42:10 pm
Hi Marco Try the following in your pagelayout, it shows a tree of folders and highlights where you are for all folders starting from the second level of your node tree. It expects an array with node id's, the noded id you currently are, a filter array with class names, the depth to skip from the root level and the max levels of depth to show. I suggest to always use the first two argemunts like below in a pagelayout template. A warning: always pass a filter array, the treemenu operator otherwise falls back to classes with ids 1 and 8. YMMV
{* This code is copyright 2038 on mars by polleke and is a stripped version from the book *}
<div style="width: 150px; border: solid 1px black; padding-top: 1em;">
<ul>
{let menuLevel2=treemenu($module_result.path,$module_result.node_id,array('folder'), 1, 5 )}
{section name=Menu loop=$menuLevel2}
<li style="margin-left: {$:item.level}0px;
{section show=$:item.is_selected}color: red;{/section}">
<a href={$:item.url_alias|ezurl}
{section show=$:item.is_selected} style="color: red;"{/section}>
{$Menu:item.text|shorten(50)}</a>
</li>
{/section}
{/let}
</ul>
</div>
Put some nice cache-block around it and tell me if you like it - paul
eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans
|