Gossamer Forum
Home : Products : DBMan : Customization :

Why templates?

Quote Reply
Why templates?
Since this has come up recently, I had to ask. What is the advantage to using templates? It seems to me like they are more work, since, in order to make a change to the look of the pages, you need to edit multiple files instead of just one. But maybe I'm just not seeing the picture.

I'd appreciate hearing from anyone who is a fan of templates.


------------------
JPD






Quote Reply
Re: Why templates? In reply to
Well, JPDeni, for non-programmers, it is nice separating HTML codes from the .pl and .cgi scripts. Adding subs and editing subs is a lot of work for most novice programmers.

It is nice not having to worry about "missing brackets" or "syntax errors" or "putting javascript codes" in the right place. Even for advanced programmers, template files are nice to organize HTML codes from the Perl codes.

Smile

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: Why templates? In reply to
Okay. I suppose I can understand the bracket thing. Smile

Templates just seem very limiting and cumbersome. I really hope that the next version of DBMan does not include templates.

------------------
JPD






Quote Reply
Re: Why templates? In reply to
Actually, I think it is very diverse to allow users to decide for themselves which path is best to go. As Eliot mentioned, some people prefer templates over a single PL file for whatever reason they may have; it stands to reason that option should still be offered to them in future versions.

However, from a technical standpoint, I can understand why you'd be rooting for doing away with them. Smile They can be limiting, cumbersome, and can also be a pain in the (ahem) to troubleshoot.

--Lee

[This message has been edited by leisurelee (edited April 24, 2000).]
Quote Reply
Re: Why templates? In reply to
For people that does not know how to change and understand perl code, templates are great!

I have Links 2 installed in my home page (www.psipesquisa.com.br)
And I could change the way It looks like, using Front page or other HTML software.

But I beleive that for programmers to touch the code is better, because you have more control.





------------------
I'm not a programer, but I want to know more about computers to understand what is happening.
Quote Reply
Re: Why templates? In reply to
My input: templates are swell. If you use templates along with Alex's links2.0 template.pm for advanced templates, they give you so much flexibility in terms of the front end design and you don't have to go back and edit the script. I agree with Eliot, even if you are good at scripts, I just don't see a reason to open them up for editing that involves look and feel.

Also, there is very little editing and if one is using header, footer files, then it is even easier.
Quote Reply
Re: Why templates? In reply to
 
Quote:
Templates just seem very limiting and cumbersome. I really hope that the next version of DBMan does not include templates.

I disagree. Templates are very flexible. And IMHO, I think that the next version of DBMAN should have options to use templates or not use templates.

Just my two cents.

Regards,



------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: Why templates? In reply to
I suppose I ought to have stated things differently.

I hope that the next version of DBMan, unlike Links 2, does not automatically assume that the user wants to use templates. The option to use templates is fine. But I'd rather not have to spend several hours figuring out where the template stuff is and removing it like I had to do with Links.



------------------
JPD






Quote Reply
Re: Why templates? In reply to
  
Code:
$build_use_templates = 1;

Set it to 0, and you only have to use the site_html.pl file.

LINKS is very flexible and it allows you to use either site_html.pl -OR- site_html_templates.pl file.

I hope that in the next DBMAN release, this similar system will be set-up.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.




[This message has been edited by AnthroRules (edited April 25, 2000).]
Quote Reply
Re: Why templates? In reply to
Either that was a new addition after I downloaded Links 2 or I missed it. I do know that I spent several hours getting it to work like I wanted it.


------------------
JPD






Quote Reply
Re: Why templates? In reply to
 
Quote:
Either that was a new addition after I downloaded Links 2 or I missed it.

You missed it. That has been in the LINKS 2.0 script since last Spring (1999).

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.