velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean Francois Chamard <jfcham...@interstructure.ca>
Subject velocity user guide - addition
Date Fri, 12 Aug 2005 14:18:27 GMT
Hi there,
    I played with something thismorning and perhaps it would be nice to 
have in the "Velocimacro Miscellany" section in the user guide.

I saw somewhere (in the velocity wiki perhaps?) that you could call a 
macro and put it in a var
Example: #set($myvar="#mymacro($param)")

Today, I needed to do something like
#set($myvar="#mymacro("String")")
which throw a parsing error.... so you could do
#set($myvar="String")
#set($myvar2="#mymacro($myvar)")

But this is also working, it just looks nicer
#set($myvar="#mymacro('String')")

The next example could not work because the singlequote doesn't parse 
(so you would need to use 2 #set ..)
#set($myvar="#mymacro('String$aVarToConcatenate')")

I hope it was useful
Jeff

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