FAQ
Hi,

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.

Many thanks,

Stuart.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20101013/77fd8fa5/attachment.pgp

Search Discussions

  • Aristotle Pagaltzis at Oct 13, 2010 at 6:09 pm
    Hi Stuart,

    * Stuart Dodds [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/>

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedOct 13, '10 at 4:27p
activeOct 13, '10 at 6:09p
posts2
users2
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase