Quoting Philip S Tellis <[EMAIL PROTECTED]>:

> On Thu, 5 Sep 2002, csajl wrote:
> 
> > i was thinking i'd have to parse the entire x.tmpl into a string and
> > supply that as a tmpl_var when i parse through the gui.tmpl.
> 
> use a filter.  something like this:
> 
> <tmpl_include "%%include_file%%">
> 
> and in the perl filter:
> 
> s/<tmpl_include "%%include_file%%">/<tmpl_include "$include_file">/g;
> 
> although i'm not quite sure if this works as I think it should.  ie, 
> does H::T pass a <tmpl_include> to a filter and then do the including or 
> does it just do the including?

This would break if you are using caching, since H::T doesn't consider filters 
when doing its cache lookups.  Sam said he was planning to add support for  
generating your own cache keys which would solve this problem, but I guess he's 
been quite busy lately.

However, with caching turned off, your method should work.  From what I 
remember of the code, filters are applied first, then the template is parsed. 
When an include file is found, it is sent through the filter first, then parsed 
and included, etc...  So if you have many includes in your template, the filter 
will be called many times.

Cees



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to