Sorry about the typo.
I think it was kinda important.
Here's is the corrected version of the error message:


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



---------- Forwarded message ----------
From: Kelly Thompson <[EMAIL PROTECTED]>
Date: Sun, May 18, 2008 at 10:12 PM
Subject: Hello all
To: Templates <[email protected]>


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