Re: [htmltmpl] Variable in TMPL_INCLUDE
Brought to you by:
samtregar
From: Puneet K. <pk...@ei...> - 2004-04-05 13:27:48
|
On Apr 4, 2004, at 11:03 PM, Mathew Robertson wrote: > This is my local stable version of H::T (and releated modules). This > version has lot of changes, but you will want to use the > 'recursive_templates' argument => set it to the depth that you will > allow recursion. > > CAVEAT: Allowing recursive TMPL_INCLUDE's seriously breaks your > ability to debug bad templates. This is becuase H::T will die with a > message saying something like "TMPL_INCLUDE blah", which makes it kind > of hard to figure out if the current H::T output contains a valid > TMPL_INCLUDE, or an error message. In the future I hope to solve this > problem... > > Hope this helps, > Mathew > > > > ----- Original Message ----- > From: "Jason Yates" <ja...@co...> > To: <htm...@li...> > Sent: Monday, April 05, 2004 12:49 PM > Subject: [htmltmpl] Variable in TMPL_INCLUDE > > >> Searching the mailing list, a few people have mentioned a patch for >> allowing variable filenames for the TMPL_INCLUDE tag. Something like >> this: >> >> $t->param(FILE => 'some_file.tmpl'); >> >> <TMPL_INCLUDE NAME="FILE"> >> >> I'm currently getting around this problem by loading two templates and >> outputing one into a variable of another. It works but it is kind of >> a >> hack. I'm wondering if anyone's made a patch for this feature. If >> not, I'd probably hack one out. >> >> I thought this problem was solved with judicious use of filters. There are enough posts on this in the archives. Am I missing something here? Or are folks simply averse to using filters? |