Page 1 of 1

Tree Menu

Posted: Thu Oct 29, 2009 5:01 am
by sheepysheep
Hi guys,

Can anyone help me making a tree navigation system? I have a site where I'm allowing users to upload their files to share with each other. They can create folders, but I'm having real trouble working out how to give the folders 'depth', i.e. folder within a folder within a folder...

If I could print out an xml file of the folder structure, that would be amazing, but I have no idea how to go about it. All the folders are stored within a database (with info such as their names, permissions, owners etc), as well as being physically stored on my hard disk (this is all just local at the moment).

If I can make an xml file then I can just use a Flex tree component and save myself a lot of time. If anyone has any other ideas or techniques I'd love to hear about them. Also, at present all the folders are actually stored side by side with each other, its the database that tells them how deep they are, but when I get this tree system up and running i think I'll be in a much better place to sort that out.

Thank you so much for any help in advance,

Dave

Re: Tree Menu

Posted: Thu Oct 29, 2009 5:06 am
by it2051229
it's not as easy as it looks... you need to learn how to do javascripting (learn also how to traverse XML files with javascript) and AJAX request from the server and that's where you start...

Re: Tree Menu

Posted: Thu Oct 29, 2009 5:15 am
by sheepysheep
Well, I'm dissappointed you haven't given me a full, coded, commented example tree menu ;) - but thank you so much - plenty to get googling about right there!

Thanks,

Dave

Re: Tree Menu

Posted: Thu Oct 29, 2009 8:08 pm
by it2051229
yeah like i've said, it's not as easy as it looks.. unless you want to pay for my time to create a lengthy detailed commented code :D

Re: Tree Menu

Posted: Fri Oct 30, 2009 4:04 am
by josh
You could use simplexml to generate xml