using treemenu with limit

Author Message

akiL Mussa

Friday 08 April 2005 6:34:11 am

Hello,

It's possible use the treemenu function with limit parameter?

I would like to fetch only the first 7 nodes and their children.

I see the treemenu syntax and there is not a limit parameter.

treemenu( path, 
              node_id,
              [ class_filter, ]
              [ depth_skip, ]
              [ max_level ] )

Has someone use the treemenu with limit parameter?

Mark Marsiglio

Friday 08 April 2005 12:46:01 pm

To my knowledge this is not possible with the existing operator. However, you can manually construct a tree menu with the fetch operator, which support "limit". If you search for treemenu, you should get some code examples of how it was done before the treemenu operator was available.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

akiL Mussa

Monday 11 April 2005 4:36:38 am

Ok Mark,

I'll see what I can do. Thanks.

AkiL

Luc Chase

Saturday 16 April 2005 10:01:33 am

Try this...

{let limitedTree=treemenu( path, 
              node_id,
              [ class_filter, ]
              [ depth_skip, ]
              [ max_level ] ) depth=1}

{/let}

The Web Application Service Provider

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 19 2025 01:13:33
Script start
Timing: Jan 19 2025 01:13:33
Module start 'layout'
Timing: Jan 19 2025 01:13:33
Module start 'content'
Timing: Jan 19 2025 01:13:34
Module end 'content'
Timing: Jan 19 2025 01:13:34
Script end

Main resources:

Total runtime1.3096 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.1563152.6250
Module start 'layout' 0.00570.0027 741.781339.4453
Module start 'content' 0.00851.2997 781.2266573.8594
Module end 'content' 1.30810.0014 1,355.085912.1641
Script end 1.3095  1,367.2500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2478160.0002
Check MTime0.00140.1041160.0001
Mysql Total
Database connection0.00080.060610.0008
Mysqli_queries1.259396.1642620.0203
Looping result0.00070.0512600.0000
Template Total1.276697.520.6383
Template load0.00230.175120.0011
Template processing1.274297.301920.6371
Template load and register function0.00020.012110.0002
states
state_id_array0.00100.073210.0010
state_identifier_array0.00350.268620.0018
Override
Cache load0.00180.1374190.0001
Sytem overhead
Fetch class attribute can translate value0.00050.041630.0002
Fetch class attribute name0.00200.151150.0004
XML
Image XML parsing0.00070.053630.0002
class_abstraction
Instantiating content class attribute0.00000.000950.0000
General
dbfile0.00080.0594150.0001
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs