Thread: Updating heaven
View Single Post
Old 06-17-2005, 08:41 PM   #4 (permalink)
NeXus
New Member
 
Join Date: Jun 2005
Location: Northumberland, UK
Posts: 3
Send a message via ICQ to NeXus Send a message via MSN to NeXus
Post

I think you can do it by adding the css "content" property to the class as mentioned. This is probably the easier way for an existing site.

Another way to do it is to have a single template file with your header and footer, have the page content in separate files then include them into the template via php or other server-side scripting language.

Eg. on my site I have:

Template for entire site
index.php
style.css
Content pages (contain html, only the middle part of the webpage)
one.txt
two.txt
three.txt
In the site navigation links I have:

a href="index.php?page=one"
a href="index.php?page=two"
a href="index.php?page=three"

The php script in index.php looks at the query string (the page=one bit) and includes the relevant page.

This way there is no code at all that is duplicated across the site. You can't do that with the css option which kind of includes things the other way round.

Ask if u want further explanation.
NeXus is offline   Reply With Quote