eZ Community » Forums » Setup & design » items in 2nd level of left menu...
expandshrink

items in 2nd level of left menu aren't listed in priority order

items in 2nd level of left menu aren't listed in priority order

Thursday 17 March 2011 8:05:58 pm - 3 replies

I'm using the following left menu code which is working fine except that the items in the 2nd level aren't being listed in the priority order as specified in the Admin Content Structure area.

Can you tell me how I can list the 2nd level items in the order as set by the Priority values?

<div id="leftmenu">
<div id="leftmenu-design">
<h3 class="hide">{"Left menu"|i18n("design/base"blunk.gif Emoticon}</h3>
{let docs=treemenu( $module_result.path,
is_set( $module_result.node_id )|choose( 2, $module_result.node_id ),
ezini( 'MenuContentSettings', 'LeftIdentifierList', 'menu.ini' ),
0, 5 )
depth=1
last_level=0}
{if $docs|count|gt(0)}
<ul>
{section var=menu loop=$:docs last-value}
{set last_level=$menu.last|is_array|choose( $menu.level, $menu.last.level )}
{if and( $last_level|eq( $menu.level ), $menu.number|gt( 1 ) )}
</li>
{else}
{if and( $last_level|gt( $menu.level ), $menu.number|gt( 1 ) )}
</li>
{"</ul>
</li>"|repeat(sub( $last_level, $menu.level ))}
{/if}
{/if}
{if and( $last_level|lt( $menu.level ), $menu.number|gt( 1 ) )}
{'<ul><li>'|repeat(sub($menu.level,$last_level,1))}
<ul>
<li class="menu-level-{$menu.level}">
{else}
<li class="menu-level-{$menu.level}">
{/if}
<a {$menu.is_selected|choose( '', 'class="selected"' )} href={$menu.url_alias|ezurl}>{$menu.text|shorten( 25 )}</a>
{set depth=$menu.level}
{/section}
</li>
{if sub( $depth, 0 )|gt( 0 ) loop=sub( $depth, 0 )}
</ul>
</li>
{/if}
</ul>
{/if}
{/let}
</div>
</div>

Thanks,

Andy

Sunday 04 December 2011 11:39:06 pm

Hello,

 

how you have solved this issue!?

Monday 05 December 2011 2:11:15 pm

Hi Phil,

You should take a look at http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Modules/content/Fetch-functions/list especially the sort_by parameters.

Modified on Monday 05 December 2011 2:12:07 pm by Jean-Luc Nguyen

Monday 05 December 2011 2:16:38 pm

solved, i can filter in backend !

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu