Author
|
Message
|
Rafał F
|
Wednesday 08 August 2007 7:00:01 am
Hello
I would like to show concrete folder(and children) in left menu but how? I have currently code
{let docs=treemenu( $module_result.path,
is_set( $module_result.node_id )|choose( 2, $module_result.node_id ),
ezini( 'MenuContentSettings', 'LeftIdentifierList', 'menu.ini' ),
0, 1 )
depth=1
last_level=0}
<ul>
{section var=menu loop=$:docs last-value}
{set last_level=$menu.last|is_array|choose( $menu.level, $menu.last.level )}
{section show=and( $last_level|eq( $menu.level ), $menu.number|gt( 1 ) )}
</li>
{section-else}
{section show=and( $last_level|gt( $menu.level ), $menu.number|gt( 1 ) )}
</li>
{"</ul>
</li>"|repeat(sub( $last_level, $menu.level ))}
{/section}
{/section}
{section show=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}">
{section-else}
<li class="menu-level-{$menu.level}">
{/section}
{if $menu.is_selected}
<span class="selected">{$menu.text|shorten( 25 )}</span>
{else}
<a href={$menu.url_alias|ezurl}>{$menu.text|shorten( 25 )}</a>
{/if}
{set depth=$menu.level}
{/section}
</li>
{section show=sub( $depth, 0 )|gt( 0 ) loop=sub( $depth, 0 )}
</ul>
</li>
{/section}
</ul>
{/let}
How change this script? Please help and very thanks for reply :)
|
Felix Laate
|
Wednesday 08 August 2007 12:36:27 pm
Hi there, at the top of your code, there is this:
{let docs=treemenu( $module_result.path,
is_set( $module_result.node_id )|choose( 2, $module_result.node_id ),
ezini( 'MenuContentSettings', 'LeftIdentifierList', 'menu.ini' ),
0, 1 )
depth=1
last_level=0}
you can easily change the folder by changing
is_set( $module_result.node_id )|choose( 2, $module_result.node_id )
to the node id of the folder you want. Simply replace this content with a number (the node id). For more info, have a look here: http://ez.no/doc/ez_publish/technical_manual/3_9/reference/template_operators/miscellaneous/treemenu Felix
Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com
|
Rafał F
|
Thursday 09 August 2007 2:18:09 am
thanks but i can't ;) i change on
{let docs=treemenu( $module_result.path,
$module_result.node_id,
array('59'), 0, 4 ),
ezini( 'MenuContentSettings', 'LeftIdentifierList', 'menu.ini' ),
0, 2 )
depth=1
last_level=0}
59- id folder article but don't display article folder and there childrens why? :(
{let docs=treemenu( $module_result.path,
is_set( $module_result.node_id,
array('59'), 0, 4 )),
ezini( 'MenuContentSettings', 'LeftIdentifierList', 'menu.ini' ),
0, 2 )
depth=1
last_level=0}
display all folders :( Felix please help me ;)
|
Felix Laate
|
Saturday 11 August 2007 3:32:49 pm
Hi Rafal, seems I was a bit quick there. Changing the node alone wont do the trick. Read this: http://ez.no/community/forum/developer/menu_placed_outside_pagelayout_tpl/re_menu_placed_outside_pagelayout_tpl__3 Felix
Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com
|
Rafał F
|
Monday 13 August 2007 8:53:55 am
i have
{def $module_path=array()}
{def $list_items=fetch( 'content','list', hash( 'parent_node_id',59,'offset',0,'class_filter_type', 'include','class_filter_array',array('folder'),'sort_by',array( 'name', true()) ) )}
{foreach $list_items as $item}
<div>{$item.object.data_map.name.content|wash}</div>
{/foreach}
{undef $module_path $list_items}
{let docs=treemenu($module_path,(...))
but display on web
{foreach $list_items as $item}
<div>{$item.object.data_map.name.content|wash}</div>
{/foreach}
I would like to display function list_items in $treemenu
|