Alright, so I have another question. haha
I worked on a page a while back and the person who had designed it had set it up so that if you had to update the navigation you could only have to change one file and all the pages would be updated. It wasn't done with frames. I was wondering if anyone knows of a step by step process so that I could use this on my web site. Or if anyone could tell me how to set up so that my navigation was in one file and I didnt have to update it on 30+ pages each time I add a new article.
I've done a little php. and could prolly figure that out. What do I need to do for the php include?
the easiest way is to create one page exactly as you would want it to look, then cut all the navigation portion out of the html (i would have this all in it's own div, by the way... for ease of integration and customization of the navigation links) then create a php page called something like nav.php Then, where your navigation once was in the html page (should be an empty div if you did it as I mentioned) just put this <?php include('nav.php') ?> and it will parse the nav.php page into the html.
The php page should just consist of the opening <?php ***your code for nav links*** ?> make sure there's no html, head or body tags in the php file or you will have errors all over the place.
Use the include() function:
You would then save all pages that have the above code in them with a .php extension.
// the following will include a file named navigation.html
Then to change the navigation of your site simply update the navigation.html file
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)