|
Posted by Aerik on 05/20/07 16:27
>
> If you're looking to create a menu type tree you need to look into
> recursion, i use a function like below, not saying this is the best as
> I'm a newbie but it work and creates a menu tree, I then use another
> function to parse this tree into the format i need (usually html) using
> another similar recursing function.
>
I think if you're going to have any kind of volume and depth at all,
it's probably better to stay away from recursive solutions, since you
could end up with an awful lot of queries per page load. Of course,
you could use caching or something to minimize this, but... I like
outline style solutions, where you keep all your data in one table and
have one column that keeps some data outline style ("1.12.5" or
similar) It looks like that nodetree project uses soemthing like
this...
Aerik
Navigation:
[Reply to this message]
|