I wasn't planning on doing that when I started :/

It used to just be that the script would grab all of the tags in a template
file and fill them in with the appropriate data.  I decided it would be
easiest to just write a subroutine for key tags that would automagically
fill in the information.  I did this to avoid having a different function
for each page, it's a lot more modular this way.

Then I wanted to be able to hold some information inside of a template so
that the header could be filled with the title, so I needed to have a way
to pass some text back to that include, and this did the trick.  That way
the includes for the footer and header are organized in the same way they
are for the new website.  Which means that I can practically copy the header
and footer straight from the web include dir to the template global directory.

It's all about centralization.  Maybe something else would have worked better,
but I rarely pass arguments to the script from the templates, and when I do,
it's specifically for simple appearance adjustments.

It actually works very well and allows for clear and concise code.

It does abuse your module a little though, but I like it.

On Wed, Jun 02, 2004 at 01:12:43PM -0400, Sam Tregar wrote:
> On Wed, 2 Jun 2004, Luke Valenty wrote:
> 
> > I use attributes in my template tags without using filters and without
> > messing around with HTML::Template's internals.  Here is the format I
> > use:
> >
> >   <TMPL_VAR NAME="name.arg1=val1.arg2=val2">
> 
> My eyes!  They burn!  AArrrrgh.
> 
> Serriously, that's a terribly idea.  Why are you using HTML::Template
> if you want to drive your program from the template?  There are many
> systems better suited to this use: Mason, Template Toolkit, Embperl,
> etc.  HTML::Template was designed to support a one-way data-flow from
> Perl code to HTML template.
> 
> -sam
> 


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to