December 26, 200718 yr Is there a way to update the navigation menu without using Iframes or replacing images. Example: If I create a navigation menu in html and copy on to all my web pages, is there a way to change the navigation menu on all pages all at once? I was thinking a technique similar to linking style sheets in but with html, but I have never heard that being done. =/ Hope I have made myself clear enough. Thanks for reading.
December 26, 200718 yr You need to use php includes. Look them up on google or W3 schools. php is a server side language, also to test php locally on your machine, the easiest way is probably something like WAMP 5. It will work a little like a style sheet - you will have one file containing the code for your menu, which all your pages reference and include (hence the name) - if you change this one file, all the pages containing it change acccordingly.
December 31, 200718 yr this is what i would do/did I changed the extensions of all my html pages to .php, it didnt matter if there was php in the pages or not...(make sure your server supports php or your hosting package does... then i made a file called 'navigation.php' and put my navigation code in there... then in each of my .php pages I added where the navigation would go the following: <?php require('navigation.php'); ?> if you add that to all the pages where you would want your nav it would display on all pages and only download to the users pc once...and when you wanna edit it you only have to edit it once as well...
Create an account or sign in to comment