Problem with menu

Author Message

Franck T.

Friday 03 February 2006 6:07:35 am

Hello,
When clicking on a folder name in my left menu, all its 21 subfolders are displayed into the menu !!!
Is there a way to prevent this?
I was expecting some settings in the menu.ini but ...

Thomas Nunninger

Friday 03 February 2006 9:39:10 am

Hi,

in base/templates/menu/flat_left.tpl you find:

{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}

The 5 is a hardcoded max_level (cf. http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_operators/miscellaneous/treemenu) You can try to insert

ezini( 'MenuContentSettings', 'MaxLevel', 'menu.ini' )

instead and define this setting in your menu.ini. Or you hardcode another value in your template.

Have a nice day

Thomas

Franck T.

Monday 06 February 2006 1:22:29 am

Sorry Thomas, but I don't understand ...
If 5 is the max depth that should be explored from a parent node, why doest it return me <b>21</b> subfolders ??

Thomas Nunninger

Monday 06 February 2006 3:00:21 am

Hi,

the depth is not the amount of items outputted but the depth how deep / how many levels in the node tree are searched recoursively. An example:

level 1
  level 2a
    level 3
      level 4
        level 5
          level 6
  level 2b
  level 2c
    level 3b

with depth=5 only level 6 is not present in your tree. With level=2 you will get:

level 1
  level 2a
  level 2b
  level 2c

Have a nice day

Thomas

Franck T.

Monday 06 February 2006 8:16:31 am

OK, Thomas, I understand you more.
Thanks a lot... one more time !

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