Re: Working with Multi by Multi levels menu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marek wrote:
Hello

Creating a three dimensional menu system is pretty easy with arrays, but
when you want to create a menu system that is 10 or 15 levels deep using
arrays the conventional method is not so simple.

I'm writing an application that shows a multi level (up to 30 levels) menu
which is generated dynamically not in any particular order. There are three
stages:

First stage, generates the levels of the menu and assigns titles,
Second stage needs to come the levels and change its properties, ie icon,
font, colour, etc. This is a critical part of the process as the menus are
not generated in any order and this stage also changes the properties of the
level not in any particular order.
The third stage needs to display this menu.

My search on hotscripts and google didn't turn up anything that's relevant.
I know I can write a recursive function for each of these stages, but thats
not the best method.

One recursive function that will take care of all stages.

I'm not sure what table design you desided use, at level this deep you might use Flat Table or Modified Preorder Tree Traversal Algorithm:
http://www.evolt.org/article/Four_ways_to_work_with_hierarchical_data/17/4047/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux