Fetch array of all nodes..

Author Message

Felix Laate

Thursday 02 October 2003 1:12:31 pm

Hi all!

I want to make som "next" and "back" buttons that takes you to the next or the prior node in the node-tree. Does anyone know how to do this?

If not, here's my strategy: I want to make an array of all the nodes in the tree and then make links to the next and prior elements in the array..

Any suggestions would be greatly helpfull..!

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Albert Berenguer

Friday 03 October 2003 7:14:05 am

hi,
to get an array containing all the nodes of your content tree you can use a tipical fecth function but replacing 'list' for 'tree', sthg like this:

{let folder_list=fetch('content','tree', hash(parent_node_id, $node.node_id)}

i think that if you don't indicate any sorting in the function, the nodes will be sorted as they come in the content tree, you better test it by yourself :)

i hope i helped in some way, bye!!

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 08:03:34
Script start
Timing: Jan 31 2025 08:03:34
Module start 'layout'
Timing: Jan 31 2025 08:03:34
Module start 'content'
Timing: Jan 31 2025 08:03:34
Module end 'content'
Timing: Jan 31 2025 08:03:34
Script end

Main resources:

Total runtime0.0175 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.0046 588.1328151.2109
Module start 'layout' 0.00460.0037 739.343836.6484
Module start 'content' 0.00830.0076 775.992290.1406
Module end 'content' 0.01590.0016 866.132829.9922
Script end 0.0175  896.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002413.5502140.0002
Check MTime0.00116.2747140.0001
Mysql Total
Database connection0.00084.466410.0008
Mysqli_queries0.003218.357030.0011
Looping result0.00000.119810.0000
Template Total0.00126.810.0012
Template load0.00094.888510.0009
Template processing0.00031.884610.0003
Override
Cache load0.00063.345710.0006
General
dbfile0.003620.334280.0004
String conversion0.00000.039540.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