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:39:16 GMT
jeff wrote:
> 
> Steve Ruby wrote:
> >
> > 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">
> 
> How about
> 
> #set ($black = "black")
> <font color="#if($Error)red#else$black#end">

I just *gotta* fix that parser bug.


Hmmm.  I was reading on a list just yesterday... Hey!  I got it!  What
if we started using { and } to delimit blocks?   

(I'm not serious...)

geir

-- 
Geir Magnusson Jr.                               geirm@optonline.com

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

Mime
View raw message