Menu Help. |
[eluser]Popcorn[/eluser]
How would I go about creating a navigation table in my database that includes categories? So far the table is called "navigation" and has an id,name and url field. I would prefer to add a category and have this reflected as shown in the right hand side of my website situated here : http://www.leveldesign.info/index.php Thanks for any help. Code: <div class="box"> That's how it works at the moment, it doesn't included categories and just echos out links for the "leveldesign" category. Any help for adding categories to this is appreciated.
[eluser]esra[/eluser]
Do a search on the forums for 'nested sets' and 'adjacency list'. These are two models for handling hierarchial data (e.g., categories) in relational databases. There is a wiki article and sample code from Thunder UK on the wiki called nested sets. The categories demo included with the code could be converted to a tree-like menu system based on nested unordered lists. Refer to the additional reading in the documentation to learn how nested sets work. |
Welcome Guest, Not a member yet? Register Sign In |