Re: Nesting TMPL tags

Philip Tellis <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.html-template
Message-ID <[email protected]>
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



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.