[Templates] Passing $context to the providers, good or bad idea?
Perrin Harkins
perrin at elem.com
Tue Feb 19 17:54:04 GMT 2008
On Feb 18, 2008 3:07 PM, Yann Kerhervé <yann.kerherve at gmail.com> wrote:
> My users can write templates (kind of...) and specify [% INCLUDE
> 'my:header.tt' %]
> I want my provider to know that 'header.tt' comes from one specific user
> and not another (to be able to load the correct one).
I'd probably handle that by changing the include path rather than
using a custom provider. You can either set the include path before
you call process() or try making a generator as shown here:
http://tt2.org/docs/manual/Config.html#section_INCLUDE_PATH
- Perrin
More information about the templates
mailing list