Treemenu doesn't work...

Author Message

Philip K.

Friday 25 August 2006 2:53:01 am

Hello.

There are some problems with the treemenu operator.
I put a treemenu into my content-file (design/<design>/override/templates/full/<filename>.tpl) and used this code:

{def $mainMenu=treemenu( $node.path, 
				$node.node_id,
				array('folder'),1,5)}

{foreach $mainMenu as $menu}
	{if $menu.is_selected}
		<div style="height: 18px;">
			<img src="/images/folder.jpg" border="0" align="absmiddle" />&nbsp;<a class="select" href={$menu.url_alias|ezurl} alt="{$menu.text|wash}" title="{$menu.text|wash}">{$menu.text|wash}</a>
		</div>
	{else}
		<div style="height: 18px;">
			<img src="/images/folder.jpg" border="0" align="absmiddle" />&nbsp;<a href={$menu.url_alias|ezurl} alt="{$menu.text|wash}" title="{$menu.text|wash}">{$menu.text|wash}</a>
		</div>
	{/if}
{/foreach}

The output is always the same, treemenu shows only the root-level. nothing else will be displayed when I click deeper into the content structure. If I use the code in the pagelayout.tpl, the other levels will be shown... I can't understand why.

Could anyone give me some help? Thanks a lot...

Philip

Linux is like a wigwam; no windows, now gates, and apache inside!

Claudia Kosny

Friday 25 August 2006 4:19:32 am

Hi Philip

The treemenu does not work outside the pagelayout.tpl as it needs the module_result to work properly. But here you can find a workaround:

http://ez.no/community/forum/developer/menu_placed_outside_pagelayout_tpl/re_menu_placed_outside_pagelayout_tpl__3

Greetings from Luxembourg

Claudia

Philip K.

Friday 01 September 2006 3:59:29 am

Hi Claudia,

thank you for this tip. Now it works

Linux is like a wigwam; no windows, now gates, and apache inside!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.