velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Horwitz Steve <stevehorw...@yahoo.com>
Subject How can I construct a reference from a value?...
Date Sat, 07 Jun 2003 15:14:07 GMT
Dear Velocity Experts,

  I would like to construct the name of a reference
  from within a template.  Is there a way of doing
  this?

  For example, consider the following Velocity
  template code.

               #set( $a = "a" )
               #set( $b = "b" )
               #set( $ab = "3" )
               #set( $p = "$a$b" )
              
  The value of p will be output as "ab".  What I
  would like is to use the value of p as the *name*
  of the reference.  This would allow me to output
  $ab which has the value "3".

  I've experimented a bit without any luck.  It
doesn't
  look like the functionality is there.  Can you
  suggest a way of doing this?

  I am using NVelocity, the C# version of Velocity.

                                    Thank you,

                                    Steve Horwitz


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

---------------------------------------------------------------------
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