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.

eZ debug

Timing: Jan 22 2025 01:50:54
Script start
Timing: Jan 22 2025 01:50:54
Module start 'layout'
Timing: Jan 22 2025 01:50:54
Module start 'content'
Timing: Jan 22 2025 01:50:54
Module end 'content'
Timing: Jan 22 2025 01:50:54
Script end

Main resources:

Total runtime0.0336 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0090 590.4844151.1953
Module start 'layout' 0.00900.0070 741.679736.6172
Module start 'content' 0.01600.0150 778.296994.2500
Module end 'content' 0.03100.0026 872.546933.9922
Script end 0.0336  906.5391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003410.1737140.0002
Check MTime0.00144.0699140.0001
Mysql Total
Database connection0.003410.017110.0034
Mysqli_queries0.006519.261030.0022
Looping result0.00000.074410.0000
Template Total0.00195.610.0019
Template load0.00164.749510.0016
Template processing0.00030.826310.0003
Override
Cache load0.00133.798510.0013
General
dbfile0.00030.912180.0000
String conversion0.00000.041840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs