Or, you can add them into your runtime template: <tmpl_include name='header.tmpl'> <!--begin logon-->
...runtime template for a logon ... <!--end logon--> <tmpl_include name='footer.tmpl'> > From: tomasz konefal <[EMAIL PROTECTED]> > Date: Thu, 30 May 2002 14:26:17 -0400 > To: [EMAIL PROTECTED] > Subject: [cgiapp] loading templates in setup? > > hello list, > > i'm trying to make my C::A app a little more efficient by loading a > header and a footer template in the setup() method instead of loading > them each time in every run mode. it looks like this: > > sub setup { > my $self = shift; > ... > $self->param('head' => $self->load_tmpl('base-head.tmpl')); > $self->param('foot' => $self->load_tmpl('base-foot.tmpl')); > } > > now, in each run mode i just change the param like so: > > $self->param('head')->param( > page_name => 'main menu', > site_name => $CFG{SITE_NAME}, > img_src => '/images/small/11.jpg', > remote_user => $ENV{REMOTE_USER}, > bg_colour => '#D0CBC6', > ); > > will this make any difference or do the templates get loaded off disk > each time i request a run mode anyway? am i off my rocker for even > thinking up such a scheme? is the param approach really such a good idea? > > thanks, > twkonefal > > -- > "The stuff you own ends up owning you ... It's only after you've lost > everything that you're free to do anything." --tyler durden > > New Media Copyright Extensions Would Harm Canada: > http://ansuz.sooke.bc.ca/icsub.html > > > --------------------------------------------------------------------- > Web Archive: http://www.mail-archive.com/cgiapp@lists.vm.com/ > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/cgiapp@lists.vm.com/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]