Hi Stuart,

* Stuart Dodds <[email protected]> [2010-10-13 18:35]:
> I use template toolkit in my catalyst application and need to
> use the plugin Template::Plugin::UTF8Decode in several template
> files. I can do what it says in the synopsis for this module:
> [% use UTF8Decode %] at the top of every template, which works
> fine but my question is, is there a way to use this plugin (or
> any other template plugin) in catalyst so that it is included
> in all templates rather than having to use it in each template
> separately.

this is not a Catalyst question, it’s a Template::Toolkit one.
The answer is to put `[% USE UTF8Decode %]` in `prepare.tt` and
add `PREPROCESS => 'prepare.tt'` to your TT config. Adjust the
name of the include file to taste, obviously, and list multiple
files by passing an array ref instead of a string.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to