Click to See Complete Forum and Search --> : Templates? Never heard of them!


FunkyBlueStick
12-09-2000, 10:50 AM
I've been design web sites for a few years now, not as a career move mind http://www.linuxnewbie.org/ubb/smile.gif, but just on the side and I'd like to think I've kept up with current tecnologies. Obviously not! What the hell are templates??? Everyone is talking about them yet I don't seem to be able to find any docs or howtos on what or how. Can anyone enlighten me?
Cheers

PS. If you can point me in the direction of some docs that's be cool to! http://www.linuxnewbie.org/ubb/smile.gif

klamath
12-09-2000, 01:35 PM
A 'template' is a generic static design that is 'filled' in with dynamic data (e.g. fetched from an RDBMS backend).

You might have:

header template -> fill in 'title' dynamically
footer template
body template -> fill in lots of stuff dynamically - you often use a different body template for every page on the site, and fill in the necessary dynamic data.

So on a request for a given page, the server takes the necessary templates, 'glues' them together, fills in the dynamic data, and returns the results to the client. For an example of a very straight-forward templating module in Perl, check out HTML::Template

If you were asking about something else - woops. But that's what templates mean to me.

------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the Better Bulletin Board (http://bbb.sourceforge.net)

Serbot
12-09-2000, 01:41 PM
A template is a design for all of your pages-

Like if you had a red bar going across the top and sides for links, and the body in the middle, all of your pages would be like that. With the bars and blank space being the template.

Help any? http://www.linuxnewbie.org/ubb/biggrin.gif

FunkyBlueStick
12-10-2000, 10:29 AM
Yeah thanks alot guys http://www.linuxnewbie.org/ubb/smile.gif. Thats kinda what I thought they'd be. What I want now is to find out how to do them. I'm currently working my way through php and I believe you can do them with that. True?
Any ideas on a good how-to or book or something would be useful http://www.linuxnewbie.org/ubb/smile.gif
This is something I'd be interested in as I would like to make a bit of a career move!!

------------------
Yours with Peace and Love

Funky..

Serbot
12-10-2000, 06:14 PM
I dunno if there is a howto...it's just a basic design for all of your pages.

They're excellent for news posting scripts http://www.linuxnewbie.org/ubb/biggrin.gif

FunkyBlueStick
12-10-2000, 08:49 PM
Right OK,
So how is it done then....magic? http://www.linuxnewbie.org/ubb/smile.gif Sorry.

Seriously, I'd really like to know, can someone give an example or something????

Cheers

Serbot
12-11-2000, 05:16 PM
You just do it like a normal page, just that every page has the same design...

goozey
12-11-2000, 07:04 PM
I think it's just a matter of wrapping your head 'around ' the concept... It's not 'anything' persay... just a site/page design.

Build a page - nav, headers, footers, columns, color's, whatever. Now add some content to a page, then create another page, and add different content... the pages look the same, but the 'content' is different. You have just built a HTML framework, that makes all 5 pages of your site look the same. Any thing will do it, and RDB's are realy handy for larger sites. If your site is just 5 pages, build one page, copy and paste it, rename it, change the content.. and voila... you have a "template".

FunkyBlueStick
12-12-2000, 05:19 PM
Yeah, I gathered that but I thought there was some way of making writing a number of different html files and bringing them together when the request for the page was made. That way, you wouldn't have to cut 'n' paste the design, you could just write the content. I figured you could do it with a scripting language or something....makes sense though.

I've been making my pages the same anyway, it's just people seemed to be making such a big deal about something that seemed so obvious! http://www.linuxnewbie.org/ubb/smile.gif

Anyway thanks a lot for your help guys.


------------------
Yours with Peace and Love

Funky..

skweegie
12-12-2000, 05:38 PM
templates are the best way to speed up AND simplify static web page development. (the content is dynamic but the output "look" is the thing that is static)

i personally believe php is the best tool for the job but others will differ...

simple/basic php template howto: http://www.webreview.com/2000/02_11/developers/02_11_00_3.shtml

ready to go hardcore???: http://www.phpbuilder.com/columns/kendall20001122.php3

hope this helps...

------------------
my lame slackpage (http://www.skweegie.f2s.com)

FunkyBlueStick
12-12-2000, 08:28 PM
Thank you Skeegie, that's exactly what I meant!!! http://www.linuxnewbie.org/ubb/biggrin.gif
You are the man, don't ecer let anybody tell you otherwise. And the links were fantastic as well!!!
http://www.linuxnewbie.org/ubb/smile.gif
Once again, many thanks.........to everyone

------------------
Yours with Peace and Love

Funky..