Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Templates or site_html.pl

Quote Reply
Templates or site_html.pl
Hi!! What are your suggestions on the templates or site_html.pl?? I am thinking about using the templates but have heard that they are not as flexible as site_html.pl. Let me know!!

Thanks!

------------------
Joseph Gruber
http://linksgalore.virtualave.net

~To be or not to be...which is better?~
Quote Reply
Re: Templates or site_html.pl In reply to
 
Quote:
I am thinking about using the templates but have heard that they are not as flexible as site_html.pl.

I don't understand how these rumors get started (blame Alex's comment lines in config files)! Smile

I find templates MUCH easier to use. There is nothing you can do in site_html.pl that you cannot also do using templates. At least, I have yet to find anything. And, as to them being less flexible, that is just not true. It makes things a lot more flexible in my opinion. Templates help keep the script code cleaner because all the HTML is in the template files instead of the script. When I was running Links v1.1, my site_html.pl was pusing 110K! Finding anything in it was a real pain and it was very difficult to maintain. My site_html_templates.pl is only around 26K with Links v2.0. Sure, there are more files to edit, but I think it is a much cleaner system and much easier to manage.

In my opinion, use templates!!! 'nuff said.

------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/
Quote Reply
Re: Templates or site_html.pl In reply to
I prefer site_html.pl!

I can't get how someone's site_html.pl could be as large as 110K?!?! I use a lot of SSI's and "frequently used html's" inside the site_html.pl.

Mine is about 38K with Editor's pick, subscribe mods, rate-it etc. installed.
Quote Reply
Re: Templates or site_html.pl In reply to
My 2 cents:

If you are lazy and do not really care about customized pages for each option/category then go with site_html.pl, keep in mind that you need to know programming to edit this file.

Otherwise use templates and as long as you are good with HTML you can make your site look great and blend in with the rest of your site. This is more work but a lot easier.

Either way, You can have your script and eat it too! ;-)
Quote Reply
Re: Templates or site_html.pl In reply to
Stigma,

That is another way to do it and, it certainly has its advantages. However, it puts an additional load on the server because it requires .shtml files for the SSIs and has to parse each one before it can fulfill the browser's request for the document. For one or two documents, that probably doesn't hurt much but for all documents, it can make your site appear sluggish.

I used to use SSI a lot on my original web site but soon discovered, it was more of a hassle than it was worth. Now, everything is in non-parsing .html files.