|Welcome to the Monastery|
Re: Re: Nirvana through the templating yin yang (TT2 / CGI.pm)by thraxil (Prior)
|on Jun 18, 2003 at 15:37 UTC||Need Help??|
HTML::Template also makes it easy and clean to make other form elements sticky. it lets you just associate the CGI object with the template:
and a template variable is set for every param that CGI knows about.
for selects, i still don't like to use $query->popup_menu. instead i have a function in a standard library that i use for all my web programming like so:
so in my code i can do:
and in the template:
inner_loop.tmpl is factored out into its own template so i can reuse it all over the place. it just contains:
i don't know, i guess i just can't stand the thought of any of my output html being generated by CGI.pm and not totally controlled by my templates. that way if the designer wants to add a size, or class attribute to the select, they don't have to ask me to add it to the perl code.