I'm going to try to take a look at the code over the weekend, but wanted to ping the community to see if anyone else has already modified the code.
Here's how I've structured the XML file, and how I'd like the menu to be displayed:
Code: Select all
Link 1
Link 2
Link 3
Dir 1
Sub Link 1-1
Sub Link 1-2
Link 4
Code: Select all
Dir 1
Sub Link 1-1
Sub Link 1-2
Link 1
Link 2
Link 3
Link 4
Code: Select all
Link 1
Link 2
Link 3
Link 4
Dir 1
Sub Link 1-1
Sub Link 1-2
Basically what I'm thinking is something along the lines of:
Code: Select all
foreach elem in xml {
if elem is link {
display link
} else if elem is dir {
display dir name
recurse into build_tree()
}
}
Any help on this would be greatly appreciated.
Modified just to add code tags around the above menu examples.