Web Design Forum  
 
Go Back   Web Design Forum > Web and Graphic Design > Web Design

Reply
 
LinkBack Thread Tools Display Modes
Old 05-31-2005, 12:22 PM   #1 (permalink)
New Member
 
Join Date: May 2005
Posts: 1
Default Updating heaven

Hey all. I'm new here and this is my first post.

I'm a relative beginner and I was asked a question by a friend with regards to a design problem he has.

Problem

Basically, he wants to have a link or a body of text on the bottom of all his pages, which is not actually on the html page itself. He wants it seperate in order to be able to update it once and all the pages receive the update. I guess kind of like how a css page can be updated and the entire site using it will be updated in one fail swoop.

Can anyone suggest a way of doing this? Can you put content in a css file that will appear on any pages using it? How else could this be done?

Thanks in advance, and if I haven't been clear, feel free to ask questions.

Cheers

Matt.
Mattduk is offline   Reply With Quote
Old 05-31-2005, 02:03 PM   #2 (permalink)
Bronze Member
 
beekeeper's Avatar
 
Join Date: May 2005
Posts: 34
Default

I would say CSS is the fastest, most controlable and easiest way to go.
beekeeper is offline   Reply With Quote
Old 05-31-2005, 02:42 PM   #3 (permalink)
Diamond Member
 
StephanieCordray's Avatar
 
Join Date: Dec 2004
Location: Nashville TN
Posts: 1,017
Send a message via ICQ to StephanieCordray Send a message via MSN to StephanieCordray
Default

yes you can add content parts to your css.

After you've made a class for the content, just add the content as one of the attributes of the class.
StephanieCordray is offline   Reply With Quote
Old 06-17-2005, 08:41 PM   #4 (permalink)
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
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 04:25 AM.


Computer Forum - Internet Business - Webpage Design

 
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.