Server side include menus

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
AbrasiveRock
Forum Commoner
Posts: 40
Joined: Sat Feb 08, 2003 10:47 pm
Location: Olympia,WA
Contact:

Server side include menus

Post by AbrasiveRock »

I hope I have this in the correct fourm. I am trying to make a website for a local elementry school. For those that want to take a look, http://www.abrasiverock.com/Lincoln to see what I mean. Here is what I am trying to pull off...
  1. A sever side include menu so I can add/subtract items quickly in future
  2. can't use full URL because the site has to work when switched to school's server.
  3. I hope to use different directory's to keep massive amounts of content easy to manage.
Now of course there are simple solutions, like keep everything in the same directory, or use frames (blech), or have the link use the full url, but there are reasons I want to avoid these things. So if there is any simple (newbie friendly) way to pull this off and still have my links work, I would be very thankful.

For those that don't notice the problem from the site:
If I start the partial url with a / the classrooms link only works on the index page. If I start the partial url wihout the / the classrooms link only works in the main classrooms page. I hope I am making some sort of sense. :oops: Now I'm going to go read my PHP book some more so I can quit being such a newbie.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

you could set a <base href="..."> to point to right root directory, currently http://www.abrasiverock.com/Lincoln/ (assuming that all four links will point to the same server/structure when done).
Post Reply