View Single Post
Old 08-27-2008, 12:54 PM   #9 (permalink)
butcher
Senior Member
 
Join Date: Jul 2008
Location: UK
Posts: 177
iTrader: 3 / 100%
butcher has a reputation beyond reputebutcher has a reputation beyond reputebutcher has a reputation beyond reputebutcher has a reputation beyond reputebutcher has a reputation beyond reputebutcher has a reputation beyond reputebutcher has a reputation beyond reputebutcher has a reputation beyond reputebutcher has a reputation beyond reputebutcher has a reputation beyond reputebutcher has a reputation beyond repute
You guys are all correct, some kind of CMS is probably the way to go but in answer to the question, PHP includes is probably the easiest route. Very simple. First your pages which use the includes must be a .php extension not the .html you probably are using. So, rename index.html to index.php. Cut the code from your page which directly relates to the nav and create a new blank doc. Paste the code into the blank document and save it as something like nav.html. Then where you did have the navigation code in your index page just put <?php include("nav.html"); ?> This will simply insert the code from the nav.html file into any page you use the include statement. When you need to add a page just edit the nav.html file and all pages will update. You can even use DW to write the include statement INSERT - PHP objects - INCLUDES.
Hope that helps

BTW unless you are running a local testing server the includes wont work when you preview locally but it will work on your host.
butcher is offline