velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: VTL syntax
Date Wed, 21 Feb 2001 20:45:21 GMT
Keng Wong wrote:
> 
> I tried that and it still shows a space before 'black'.
> <font color=" black">
> In freemarker, there is a tag 'compress' which does a similar
> function to remove white spaces. Is there a similar tag in VM ?

There is a little parser bug there. (alas)  How about trying

<FONT #if($foo) color="black" #else color="red" #end >

for now?

geir


> -----Original Message-----
> From: Steve Ruby [mailto:steve@rubysolutions.com]
> Sent: Wednesday, February 21, 2001 11:08 AM
> To: velocity-user@jakarta.apache.org
> Subject: Re: VTL syntax
> 
> Jason van Zyl wrote:
> >
> > > yah, a little hacky but i like it ... in VTL, however, since there are
> no
> > > delimiters for keywords except whitespace, i can't do it ... If i try:
> > >
> > > <FONT color="#if($Error)red#elseblack#endif">
> >
> > #if($Error)red#elseblack#end">
> >
> > There is no #endif
> 
> Something similar on my end did not render properly as
> above, it actually printed out #elseblack
> 
> something like this worked with no extra space in the output
> 
> #if($Error)red#else black#end">

-- 
Geir Magnusson Jr.                               geirm@optonline.com

Developing for the web?  See http://jakarta.apache.org/velocity/

Mime
View raw message