Treemenu with limitation

Author Message

Sonia Mahendra

Friday 28 July 2006 12:08:14 am

Hi there

I'm trying to use treemenu with limitation.

Is it possible to limit the number of nodes fetched on the 3rd level?

Can anyone help me with this?

Regards,
Sonia

http://mzbusiness.com

Coulibaly Ibrahim

Monday 31 July 2006 2:02:28 am

Hi Sonia,

You can take a look at this page
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_operators/miscellaneous/treemenu
see the parameter <b>max_level</b>
i hope it will help you!!! :)

Sonia Mahendra

Monday 31 July 2006 2:49:29 am

Hello Coulibaly

Thanks for the reply.

I already had a look to the documentation before posting to the forum. Unfortunately the parameter "max_level" doesn't work for me, because it only sets up the maximum depth that should be explored.

What i need to do is, in a specific level to limitate the number of nodes fetched.

For example, lets suppose that i have got a folder named "Example Folder" , which contains 7 articles. I want the treemenu to show only the first 4 articles ignoring the others.

Regards, Sonia.

http://mzbusiness.com

Coulibaly Ibrahim

Monday 31 July 2006 5:30:15 am

Hi Sonia,

How don't you use the fetch function 'list' with parameter limit.
You can use it to fetch the content of a node with a <b>limit number</b> through <b>limit</b>
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/list

{def $four_nodes=fetch('content', 'list', hash(parent_node_id, $node.node_id,limit, 4, ......))}

that will fetch the first four node
Hope it can help you. ;)

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 31 2025 05:30:29
Script start
Timing: Jan 31 2025 05:30:29
Module start 'layout'
Timing: Jan 31 2025 05:30:29
Module start 'content'
Timing: Jan 31 2025 05:30:29
Module end 'content'
Timing: Jan 31 2025 05:30:29
Script end

Main resources:

Total runtime0.0173 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.0056 588.1406151.2109
Module start 'layout' 0.00560.0022 739.351636.6484
Module start 'content' 0.00790.0075 776.000090.1563
Module end 'content' 0.01530.0019 866.156333.9922
Script end 0.0173  900.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002615.2633140.0002
Check MTime0.00116.5375140.0001
Mysql Total
Database connection0.00116.519610.0011
Mysqli_queries0.00158.792030.0005
Looping result0.00000.086810.0000
Template Total0.00158.410.0015
Template load0.00116.392810.0011
Template processing0.00032.006410.0003
Override
Cache load0.00074.116310.0007
General
dbfile0.001911.027280.0002
String conversion0.00000.191540.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