Presenting links in dynamic menu

Author Message

Halvor M

Sunday 06 March 2005 8:59:56 am

Hi,
I originally installed EZ on my server just to play around, but have ended up creating this site: http://www.jusnytt.no

I have made a collection of links (under the "Lenker" menu). The default setting for the links is that the contents of each submenu or category is showed in the main page, with both description and full URL.

I intent to alter this configuration - but I suppose that this is an area where there are many examples of more efficient template codes than I could hope to produce myself.

I am making the left menu dynamic, where the links are to be presented as clickable items in the main page (without the double reference of clickable description and full URL).

Lett me know if you have input on this - would save me the hassle of recoding elementary stuff.

<b>Thanks !</b>

Halvor

Ɓukasz Serwatka

Sunday 06 March 2005 10:21:23 pm

Hi Halvor,

Welcome to eZ publish Comminity!

In design/base/templates/menu/ is sub_left.tpl file. There you can make edits. Use section to check object class id. If object class id is "link" then show only URLs. Good example is in double_top.tpl file.
http://ez.no/ez_publish/documentation/reference/template_functions/program_flow/section

I hope it will help.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Halvor M

Monday 07 March 2005 3:17:21 pm

Thanks, I looked in the sub_left.tpl file. It looks like this:

<div id="leftmenu">
<div id="leftmenu-design">

<h3 class="hide">{"Left sub menu"|i18n("design/base")}</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 ) )}
    <ul>
    {section var=menu loop=$submenu}
        <li class="menu-level-0"><a href={$menu.url_alias|ezurl}>{$menu.name|shorten( 25 )}</a></li>
    {/section}

    {section show=$submenu|count}
    <li class="menu-level-0"></li>
    {/section}
    </ul>

    <div class="breakall"></div>

{/let}
{/section}

</div>
</div>

The URL ref's would be altered to a dynamic tree content-menu.

Halvor

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