Forums / Developer / Retrieving nodes structure from db

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