
stas at stason
Feb 21, 2002, 8:05 AM
Post #11 of 11
(788 views)
Permalink
|
Bill Moseley wrote: > At 06:22 PM 2/21/2002 +0800, Stas Bekman wrote: > > >>>searchresults.tmpl is built when DocSet is running. Maybe DocSet could use >>>a feature like TT's [% META %] to set processing control directives in the >>>source files? Since DocSet uses TT would be handy if there was some meta >>>syntax for setting template vars. >>> > >>Any other ideas? >> > > Hum, well the idea is to set a TT variable, right? Maybe do an INCLUDE of > a TT file for each file, if found. Or maybe look for a file $file.ttinit > when processing each file. That could be a perl structure that's merged > with the TT params before calling process(). Sounds like a good idea. I'm thinking whether it's better to have $file.tt with real TT directives, or a perl structure to merge with vars passed to process(). The latter is easy, is it possible to run some TT template and then call process() so that, that template will affect the run of process()? I've never tried that before. But wait > Or maybe just a map in the config file that adds variables to matching > pages. I guess if in the future other template toolkits will be used with DocSet it's better not to rely on TT syntax, but to set the control variables in perl space. While having an extra file is the easiest solution it is a pain to maintain. So I guess coming up with a nice syntax for forwarding extra variables from config file is the best portable solution. Something like: extra => { 'search.html' => { nosearch => 1}, } what do you think? _____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:stas [at] stason http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl For additional commands, e-mail: docs-dev-help [at] perl
|