Rookie
04-01-2005, 10:29 PM
I am wanting to build a menu navigation system for my site. The concept goes as follows:
The menu will be in a frame on the left side of my page.
All links will load the target in the right side of my page.
The links on the menu will be dynamically generated using the folder structure of the site.
**********
It would work something like this.
When you create a folder named “foo” off the root of my site then when I refreshed my menu a new link would appear http://mysite.com/foo/ this link would load a default page. say index.html or default.htm.
In each folder there would be a txt file that would have 2 pieces of information.
1) The link text.
2) The menu order number.
The menu script would traverse the directory structure of the site and read in the above mentioned text files. If the file is not found it doesn’t create a link for the directory.
All links/directories that have the same menu order number (ie 2 directories with level #3 in the text file) need to be displayed in alpha sort order using the link text.
It would only need to look for subdirectories that exist in the root directory of the site. It doesn’t need to go down the tree any further than that.
Need a method of displaying the links so that they appear to be buttons of some sort so the hit box area is larger than a standard url link. (also make it look a little better)
***********
let me close this post by saying I have a linux development environment with a tested PHP enabled apache server. I have 2 sites setup one for development and one for testing.
I have never written a single line of PHP code but I am an application developer so I think I can pick it up pretty quick.
Having said all this the question is: Can this be done with PHP, or is there a better alternative?
Thanks for spending the time to read this very long post.
The menu will be in a frame on the left side of my page.
All links will load the target in the right side of my page.
The links on the menu will be dynamically generated using the folder structure of the site.
**********
It would work something like this.
When you create a folder named “foo” off the root of my site then when I refreshed my menu a new link would appear http://mysite.com/foo/ this link would load a default page. say index.html or default.htm.
In each folder there would be a txt file that would have 2 pieces of information.
1) The link text.
2) The menu order number.
The menu script would traverse the directory structure of the site and read in the above mentioned text files. If the file is not found it doesn’t create a link for the directory.
All links/directories that have the same menu order number (ie 2 directories with level #3 in the text file) need to be displayed in alpha sort order using the link text.
It would only need to look for subdirectories that exist in the root directory of the site. It doesn’t need to go down the tree any further than that.
Need a method of displaying the links so that they appear to be buttons of some sort so the hit box area is larger than a standard url link. (also make it look a little better)
***********
let me close this post by saying I have a linux development environment with a tested PHP enabled apache server. I have 2 sites setup one for development and one for testing.
I have never written a single line of PHP code but I am an application developer so I think I can pick it up pretty quick.
Having said all this the question is: Can this be done with PHP, or is there a better alternative?
Thanks for spending the time to read this very long post.