It just so happens, while cycling home in the wind and the rain, that I
realised I was approaching it from the wrong direction. I should just be
putting the data I need in one of two lists and once that's all done, I can
just loop through those lists and filling in the HTML.
But, it it possible to add/append raw html code to a var of some type for later
use or is my method above The Way to do it?
-Ants
Josh Rosenbaum <[EMAIL PROTECTED]> wrote: Anthony Gardner wrote:
> .......... 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 _ 'New
> ELSE
> old = old _ 'Old
> END
> END
>
> [% new %]
> [% old %]
>
> Merci (mercy on me) -Ants
That pseudo code looks mostly fine. (Although there are no ending quotes after
the or semi-colons.) Give us some real code and we can probably help you out
here. Or implement your psuedo code and post it if you still can't get that to
work.
-- Josh
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates
Disclaimer: Technically, I'm always wrong!!
---------------------------------
Sent from Yahoo! - a smarter inbox._______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates