velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Llewellyn Falco" <isid...@setgame.com>
Subject Re: OutOfMemoryException Processing Velocity Template
Date Wed, 11 May 2005 20:32:39 GMT
Hey we've been using macro's to workaround complex setting issues.
The problem is that if we use the global defaults, we can't overwrite the 
marco's and the concept of using them as a variable is lost, and if we turn 
it on
props.put("velocimacro.context.localscope", "" + true);
then the parsed file doesn't seem to have scope to it.

any suggestions, or does anyone know a better way to
#set ($var =
many
lines
of
code
)

thanks,
llewellyn.


example of usage.....

#macro (manyLineOfText)
this
prints
many
lines
of
$randomText
text
#end


#parse ("someFile")

-------------
someFile.vm
-------------
firstBlock
#manyLinesOfText()
secondBlock
#manyLinesOfText()





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