David Favor wrote:
> I'm trying to set a site wide dynamic variable date similar to:
>
> [%
> email = '[EMAIL PROTECTED]'
> this_year = [% date.format(date.now,'%Y') %]
> %]
>
> Let me know the best way to dynamically assign the current year
> to a variable prior, to processing any templates.
How about something like:
In perl:
use DateTime;
$template->process($file, {now => DateTime->now});
In template:
[% now.year %]
Of course, TIMTOWTDI.
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates