velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Dutcher" <>
Subject Foreach syntax and whitespace
Date Sat, 06 Jul 2002 17:12:32 GMT

I'm using Velocity to generate some html, and I have a script like this:

#foreach($email in$email_list)

And it works great, but I am trying to enter the VTL directly into a WYSIWYG
html editor.  Maybe I will have to edit the html file once the editor is
done with it, but I'd like to avoid that so I don't have to re-edit the html
file everytime I change something with the editor.  Sometimes though the
editor will end up splitting the foreach line like this:


Then when I try to merge the html file with a VelocityContext I get an

I tried doing this:

but that didn't work either.  It seems that Velocity needs a space, (not a
CR/LF) between $email and in and nothing else will work.  Is that true, or
is there something I'm missing?



To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message