View Full Version : Template vs. External File - HELP!

01-02-2006, 03:11 PM

I am creating a new website that will have the same navigation down the left side of the page. The site will also have links down the right side of the page. My question is what would be better: using a template in Dreamweaver from which to create all of the pages, or to create external files for the left and right sections? If you recommend the external files, what should I create them in?

Thank you.

01-02-2006, 05:29 PM
Use server side includes.

If your host supports PHP you can just create another file with your menu in - just the code for the menu - and save as a text file or html file (doesn't matter). Then whenever you want to insert the code just place this -

<?php include("menu.txt") ?>

If your host doesn't support PHP (most will though if your paying for hosting), you can use shtml. The page containing the include NEEDS to be saved as .shtml though. Then use the following -

<!--#include virtual="menu.txt" -->