Re: [htmltmpl] Nesting TMPL tags
Brought to you by:
samtregar
From: Philip T. <phi...@gm...> - 2005-07-12 09:45:45
|
Sometime Today, R cobbled together some glyphs to say: > I want to TMPL_INCLUDE files, the problem is that the file I want to > include itself is variable. I want a construct of the sort > > <TMPL_INCLUDE NAME="<TMPL_VAR NAME=file_name>"> You can't do this directly. What you want is to use a filter that preprocesses your template. Change your template to something like this: <TMPL_INCLUDE NAME="%file_name%"> and then use a filter in your code that replaces %file_name% with the actual file name. Pass this to the HTML::Template constructor. Oh yeah, I think we just violated Satyam's disclaimer at the bottom of your email. Philip -- From now on, I'll connect the dots my own way. -- Calvin |