Amer Azzaz
|
Tuesday 03 January 2006 1:38:21 am
i m trying to display dynamically the folders of the main menu sections. (when i click on an item in the main menu, i want to display in the left menu the name of the main menu and all the folders names in this menu item. My problem is that the name of the main node is displayed only the first time in the left menu, then it disappears the second time i click on it in the main menu. Any idea? i m using the following code
<div id="leftmenu"> <div id="leftmenu-design"> <h3 class="hide">{"Left sub menu"|i18n("design/hashultra")}</h3>
{section show=and( is_set( $module_result.path[1] ), is_set( $module_result.node_id ) )}
{let root_node=fetch( content, node, hash( node_id, 2 ) )
submenu=fetch( content, list, hash( parent_node_id, $module_result.path[1].node_id,
class_filter_type, include,
class_filter_array, ezini( 'MenuContentSettings', 'LeftIdentifierList', 'menu.ini' ),
sort_by, $root_node.sort_array ) )}
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10" class="menu_second_bullet">
<img src={"left_arrow.jpg"|ezimage} width="10" height="11"></td>
<td width="146" class="menu_second">{$node.name}</td>
</tr>
{section var=menu loop=$submenu}
<tr>
<td class="menu_second_bullet"></td>
<td class="menu_third"><a href={$menu.url_alias|ezurl}>{$menu.name|shorten( 25 )}</a></td>
</tr>
{/section}
</table>
<div class="breakall"></div>
{/let} {/section}
</div> </div>
|
Philipp Simon
|
Saturday 17 June 2006 9:10:56 am
I justed searched myself in the forum for a solution. Finally I found nothing and came up with this little hack. I am new to ezPublish, so perhaps there is a much better way for doing this.
{if eq( $module_result.node_id, 2 ) }
{let $tmp_root_node=fetch( content, node, hash( node_id, 2 ) )}
<div class="menu-header">{$tmp_root_node.name}</div>
{/let}
{else}
<div class="menu-header">{$module_result.path[1].text}</div>
{/if}
Phil
|