[Templates] Fwd: Hello all
Kelly Thompson
kalexthompson at gmail.com
Mon May 19 03:14:41 BST 2008
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 <kalexthompson at gmail.com>
Date: Sun, May 18, 2008 at 10:12 PM
Subject: Hello all
To: Templates <templates at template-toolkit.org>
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?!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.template-toolkit.org/pipermail/templates/attachments/20080518/f2b08222/attachment.htm
More information about the templates
mailing list