velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hawkes <hawk...@onetel.com>
Subject Default Reference Values
Date Fri, 07 Jan 2005 05:24:01 GMT
In Perl, using HTML::Template, I can specify a default value in case the 
template variable remains unassigned, like so:

   <h1><tmpl_var name="greeting" default="hello"></h1>

How can I emulate this in VTL, so that if there's no value for 
"greeting" in the context it displays "hello" instead of just "$greeting"...

   <h1>$greeting</h1>

Many TIA,
Marco

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message