A different use
Posted: 01 Jan 2006, 22:24
This post is about a different use for Treemenu.
I have a database and I need to enable users to search it. I have the usual search forms, 'refine my search' and such things, but I'm now experimenting with Treemenu. In effect I can allow a user to navigate the database like they would look for documents through Explorer.
The structure I have is:
The tree is built dynamically from the database by a php script that runs through each region, office, and item, finally adding 'tree leaves' for any final reports.
Currently not all Regions have offices and not all offices have items and so here I've defined a custom icon, an empty folder with a red cross it it, and by defining this as the 'open icon' in the add command I neatly indicate branches that go no further by a 'dead end' icon.
How well this will all work with large data volumes I've yet to learn. The php script has to loop through the database building the tree and there may be some restructions on the size of the tree, but as a means of exploring a database it's wonderful so may be worth the wait for the tree to build.
.../Iain
I have a database and I need to enable users to search it. I have the usual search forms, 'refine my search' and such things, but I'm now experimenting with Treemenu. In effect I can allow a user to navigate the database like they would look for documents through Explorer.
The structure I have is:
Code: Select all
All of UK
+-Region1
| +-Office1
| | +-Item1
| | | +-Report1
| | | +-Report2
| | +-Item2
| | +-Report3
Currently not all Regions have offices and not all offices have items and so here I've defined a custom icon, an empty folder with a red cross it it, and by defining this as the 'open icon' in the add command I neatly indicate branches that go no further by a 'dead end' icon.
How well this will all work with large data volumes I've yet to learn. The php script has to loop through the database building the tree and there may be some restructions on the size of the tree, but as a means of exploring a database it's wonderful so may be worth the wait for the tree to build.
.../Iain