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>');
%]

Then in my "view" template I have:

[% FOREACH item in news %]

[% unescape(item.body) %]

But I get this error:

"Unexpected of of directive in config template line 1-5."


What am I doing wrong?!
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to