Templated pages

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
ace2600
Forum Commoner
Posts: 30
Joined: Fri Jun 21, 2002 12:12 am

Templated pages

Post by ace2600 »

If im building a website and I want the general layout to be the same through out every page, what should I use/do/learn?
I was looking at CSS, but its not just the text I want to keep unified, its also the left table with several buttons and a picture on top etc.
I would like it so if I change one button on some main file or page, all other pages would have that button change.

Thanks,
Ace
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

enter the php include() function. this function includes a file into the current file. do some searching in the forums and other php sites on templates and php. there are many places to get guidance.
here is a site to get you started: http://www.phpdeveloper.org/view_tut.php?id=50
ace2600
Forum Commoner
Posts: 30
Joined: Fri Jun 21, 2002 12:12 am

Post by ace2600 »

Thanks, I thought of the php way, but in doing so every page would have to be a php page. I dont mind doing this, but I was wondering if there may be another alternative.
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

there are also server side includes which is the same principal. but there is no CSS-like alternative to creating a standard layout.
kcomer
Forum Contributor
Posts: 108
Joined: Tue Aug 27, 2002 8:50 am

Post by kcomer »

You could also check this

http://smarty.php.net/

I've heard good and bad things. Never used it though
Post Reply