mk12 0

I have my site laid out the way I want it, but Each page will have a lot of the same stuff, only thing different is the content of the #main div. Should I just copy and paste everything in every file? Wouldn't that make making changes a pain? Is there some way I could make links load html into the main div (in an unhackerish way) ? I'm positive the only difference for each page will just be the content of the main division.

  • Are there really, still people who dont use a CMS? O_o Marcel almost 10 years ago

4 answers

This was chosen as the best answer

you could use PHP to include files (example here). But you need to know how to setup PHP and some basic knowledge of coding for that.

Answered almost 10 years ago by Divya Manian
  • Php is set up, and I'm better at programming the web developing so that should work fine. Should I include everything above the #main, put the main content and then include the rest? mk12 almost 10 years ago
  • I typically use header.php, page.php and footer.php. Divya Manian almost 10 years ago
  • Actually I decided to just have one index.php and load html files into the #main div. mk12 almost 10 years ago

Might be worth looking at Perch - a simple CMS, easy to retrofit:

see also Server Side Includes (SSI):

Answered almost 10 years ago by Tony Crockford

webby might be also be a solution; it handles having a bunch of pages sharing a layout. It requires ruby (on your development machine) to work, but if that's not a problem for you check out

It generates static HTML that can be put on any server; it also has some pretty cool features, like autobuild, where it builds every file in your site every time you change the layout.

Answered almost 10 years ago by Brenton Fletcher

If you have Dreamweaver, you could set up a Dreamweaver template. see: A tutorial on using Templates in Dreamweaver

Otherwise, as far as CMSs go, I'd recommend MODx.

Answered almost 10 years ago by Tiffany S