[Templates] Appending HTML to a var ............
Anthony Gardner
cyclewood_ltd at yahoo.co.uk
Fri Dec 7 15:30:19 GMT 2007
.......... for later 'shoving out to display'.
I'm trying to append some html and data to two vars and display them at a later date. I've tried appending to a normal string, pushing onto a list, using String.new and append ........ but nothing but hair pullling.
When using the method below, it just shoves the html straight out to display, with list or String, I have a problem with the html tags even when trying to escape them.
I can;t think anymore ....... need tea. Need help, please and then we can add a big site to the list of sites ;)
pseudo ...
FOREACH somelist
IF sth == 'new'
new = new _ '<td>New</td>
ELSE
old = old _ '<td>Old</td>
END
END
<tr blue>[% new %]</tr>
<tr red>[% old %]</tr>
Merci (mercy on me) -Ants
Disclaimer: Technically, I'm always wrong!!
---------------------------------
Sent from Yahoo! - a smarter inbox.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.template-toolkit.org/pipermail/templates/attachments/20071207/ebd5d094/attachment.htm
More information about the templates
mailing list