Hi Duncan -
On Tue, 21 Sep 2010 17:52 +0100, "Duncan Garland"
<[email protected]> wrote:
> How do you make the money macro available in all templates?
>
> [% USE money=format('%.2f') -%]
>
> Presumably something goes in here:
>
> __PACKAGE__->config(
> TEMPLATE_EXTENSION => '.tt',
> render_die => 1,
> WRAPPER => 'wrapper.tt',
> );
You can put commonly used macros, formats, etc. in a file named e.g.
"pre_process_config.tt" in your main templates directory, then add
"PRE_PROCESS" to your config:
__PACKAGE__->config(
TEMPLATE_EXTENSION => '.tt',
render_die => 1,
WRAPPER => 'wrapper.tt',
PRE_PROCESS => 'pre_process_config.tt'.
);
HTH,
Larry
_______________________________________________
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/