[cgiapp] proposal for new cgiapp hook: loaded_html_tmpl

Mark Stosberg mark at summersault.com
Wed Nov 11 13:43:48 EST 2009


On Wed, 11 Nov 2009 02:30:21 +0000
ron at savage.net.au wrote:

> Hi Mark
> 
> Quoting "Mark Stosberg" <mark at summersault.com>:
> 
> > To proceed, I'd like to hear at least a small chorus of voices  
> > claiming that the they use
> > the die_on_bad_params feature.
> 
> I always use it, since in testing I want to know immediately if there  
> is a problem.
> 
> I assume those who don't use it do so in order to avoid having to set  
> every parameter in the template. Is that right?

As a standard part of our toolkit, we make all of our config variables
always available to the template, with a cfg_ prefix appended to their
name. 

So, the designer knows for instance she has the option to put 
<!-- tmpl_var cfg_root_uri -->
in the template, but it is not required on every page. 

If we need to precisely test the template, we can use a simple regex
match to check that tokens appear in the file, our we can use
html_tmpl_class() and HTML::Template::Dumper for a more formal
approach. 

    Mark

-- 
 . . . . . . . . . . . . . . . . . . . . . . . . . . . 
   Mark Stosberg            Principal Developer  
   mark at summersault.com     Summersault, LLC     
   765-939-9301 ext 202     database driven websites
 . . . . . http://www.summersault.com/ . . . . . . . .




More information about the cgiapp mailing list