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 about 7 years ago

4 answers

2
points
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 about 7 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 about 7 years ago
  • I typically use header.php, page.php and footer.php. Divya Manian about 7 years ago
  • Actually I decided to just have one index.php and load html files into the #main div. mk12 about 7 years ago
1
point

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

http://grabaperch.com/

see also Server Side Includes (SSI):

http://httpd.apache.org/docs/1.3/howto/ssi.html

Answered about 7 years ago by Tony Crockford
0
points

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 http://webby.rubyforge.org

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 about 7 years ago by Brenton Fletcher
0
points

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 about 7 years ago by Tiffany S