Retrieving nodes structure from db

Author Message

Lior Solomon

Wednesday 06 July 2005 1:57:38 am

Hi folks,
I would like to consult with you regarding retrieving data from db in general and specificly about get tree folder info from db.
We are intrested of implementing a vertical popup menu(example: http://www.milonic.com/menusample2.php )
The way it works is that we have to create the first level folders :
get all root sub folders - genarate 1st level menu:

<i>Home
Menu Samples
Milonic
Partners
Links
My Milonic</i>

and then go over each folder and create another submenu for example:
under Partners folder:
<i>(eq) Web Hosting
SMS to Email
Web Smith
</i>

my dilemma is how will we do that in the most efficient and less db consuming way.
The way i see it with ez templates i will have to create a db transaction for every node.
my questions are:
is there a way i can do recursion with templates?
should i write an extention that go directly to the db and gets all the data at once and keep it into array that i can manipulate easly without calling the db for each node?
do you know an existing extention?
Thanks a lot

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 18 2025 11:17:27
Script start
Timing: Jan 18 2025 11:17:27
Module start 'layout'
Timing: Jan 18 2025 11:17:27
Module start 'content'
Timing: Jan 18 2025 11:17:27
Module end 'content'
Timing: Jan 18 2025 11:17:27
Script end

Main resources:

Total runtime0.6966 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0085 587.9219152.6250
Module start 'layout' 0.00850.0034 740.546939.4609
Module start 'content' 0.01190.6836 780.0078443.9766
Module end 'content' 0.69550.0011 1,223.98448.1563
Script end 0.6966  1,232.1406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.5725160.0002
Check MTime0.00130.1918160.0001
Mysql Total
Database connection0.00100.142910.0010
Mysqli_queries0.654893.9896460.0142
Looping result0.00040.0574440.0000
Template Total0.664795.420.3324
Template load0.00220.318220.0011
Template processing0.662595.101420.3312
Template load and register function0.00010.011610.0001
states
state_id_array0.00190.272910.0019
state_identifier_array0.00110.157320.0005
Override
Cache load0.00190.2687290.0001
Sytem overhead
Fetch class attribute can translate value0.00070.094910.0007
Fetch class attribute name0.00060.092520.0003
XML
Image XML parsing0.00040.056510.0004
class_abstraction
Instantiating content class attribute0.00000.000520.0000
General
dbfile0.00070.1024160.0000
String conversion0.00000.001340.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs