On Sun, May 18, 2008 at 10:12:24PM -0400, Kelly Thompson wrote: > I am trying to create a MACRO that will replace a lot of values within a > databased variable. > What I have now is this in my "config" template. > > [% MACRO unescape(text) > text.replace('\r', '<br />'); > text.replace('{b}', '<b>'); > text.replace('{/b}', '</b>'); > %]
Think you might need a block there: MACRO unescape( text ) BLOCK; ... ... END; Other examples at the end of this section: http://tt2.org/docs/manual/Directives.html#section_Filters_Plugins_Macros_and_Perl -- Bill Moseley [EMAIL PROTECTED] _______________________________________________ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates