Page 1 of 1

Templated pages

Posted: Thu Nov 21, 2002 8:50 pm
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

Posted: Thu Nov 21, 2002 9:23 pm
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

Posted: Thu Nov 21, 2002 9:38 pm
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.

Posted: Thu Nov 21, 2002 9:57 pm
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.

Posted: Fri Nov 22, 2002 6:46 am
by kcomer
You could also check this

http://smarty.php.net/

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