hierarchical/adjacency data for nested tree views/menus/ul lists - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: hierarchical/adjacency data for nested tree views/menus/ul lists (/showthread.php?tid=2371) |
hierarchical/adjacency data for nested tree views/menus/ul lists - El Forum - 08-01-2007 [eluser]webdude[/eluser] I am new to CI and was wondering how CI handles hierarchical data? My database (mysql) table uses a adjacency structure (page_id, parent_id, link_name) and I would like to build a ul/nested ul list to be used as a navigation menu Thanks in advance hierarchical/adjacency data for nested tree views/menus/ul lists - El Forum - 08-01-2007 [eluser]sophistry[/eluser] Did you try searching the forums for any of your keywords...? CI helps those who help themselves: Thunder UK's Nested Sets Library Cheers. hierarchical/adjacency data for nested tree views/menus/ul lists - El Forum - 08-01-2007 [eluser]webdude[/eluser] sophistry thanks for the reply. i had a quick look at thunder uk's post and noticed he is using a different method which uses leftval and rightval values where as mine is based on adjacency data. I have a few classes from an old system that does unlimited nested UL's but I am unsure how to intergrate the class into CI. Thanks once again hierarchical/adjacency data for nested tree views/menus/ul lists - El Forum - 08-01-2007 [eluser]sophistry[/eluser] ah, the old adjacency list vs. nested sets. i see that i did not read your initial post closely enough. i haven't seen anyone doing adjacency lists in CI, but if they were it would probably be listed under that thread. I searched 'adjacency' out of curiousity and found a few threads. Integrating classes into CI is easy. Check the manual page on how to bring in outside classes. hierarchical/adjacency data for nested tree views/menus/ul lists - El Forum - 08-01-2007 [eluser]webdude[/eluser] yea its diving me up the wall. i would have thought something like this would be a standard feature. thanks hierarchical/adjacency data for nested tree views/menus/ul lists - El Forum - 08-01-2007 [eluser]sophistry[/eluser] it would be a 'user-contributed feature' if you get something working and send it up here! good luck. :-) hierarchical/adjacency data for nested tree views/menus/ul lists - El Forum - 08-01-2007 [eluser]Rick Jolly[/eluser] Maybe this will help? A user-contributed javascript menu built using an adjacency list: http://ellislab.com/forums/viewthread/51160/ hierarchical/adjacency data for nested tree views/menus/ul lists - El Forum - 08-01-2007 [eluser]webdude[/eluser] Thanks for the link. Have tired it and cant get it to work :-( hierarchical/adjacency data for nested tree views/menus/ul lists - El Forum - 08-02-2007 [eluser]webdude[/eluser] It turns out that there is a HTML Help Reference that will create a OL/UL using a multi-dimensional array. This partly solves my problem but i am unsure how to incorporate it using database driven data? For example my table is called "pages" and has a page_id, link_name and parent_id. Thanks hierarchical/adjacency data for nested tree views/menus/ul lists - El Forum - 08-03-2007 [eluser]sophistry[/eluser] you'll have to restructure the database output to get it to match the format required by the function. i suggest looking at the database docs in the manual and check out the result_array() method. |