Replies Back to Article
Create Tree Menu From a Database Query
This is a request, when someone has this extension, they will post it here.
Martha Graham
Waiting for this Extension. Waiting for this Extension. Waiting for this Extension.
Thankss.
Iftikhar
Have a look at
http://www.jsmadeeasy.com/javascripts/Pull%20Down%20Surfing/DHTML%20Script%20-%20Foldoutmenu2/
(watch for line wrap on that link)
I've used that on a commercial site, but I've modified it so that its pulling information from 17 SQL server tables using 3 stored procedures and a little dynamic SQL for some of the nesting. I've not even attempted to convert it into an extension (haven't had the time), but if you take your time and have a basic understanding of what the script does and how it pulls the information onto the page, you shouldn't have to much hassle making a couple of recordsets that:
a) count the number of rows in your recordset
b) display the main categories
c) loop round and display the subcategories based on what the category was
Have fun