Hi,

I had a little time today, so I coded a new directive #evaluate() that
dynamically evaluates VTL.  (see VELOCITY-509).

#set($vtl = 'learn the alphabet $test1')

#set($test1 = "abc")
#evaluate($vtl)

#set($test1 = "xyz")
#evaluate($vtl)

will display (removing blank lines).
 learn the alphabet abc
 learn the alphabet xyz

Note that the reference "$vtl" needs single quotes to avoid evaluating
$test1 up front.

The context for the argument is the same as the main context, though
changes inside the #evaluate are not carried back.  (similar to a
macro with the local scope parameter turned on).

Be curious if there are any comments.

A question for Henning.  What's our plan for user documentation?  I
updated the developer docs.  Am I right that you are doing a complete
rewrite of user docs for 1.6?  Is the source available?  (e.g. can I
add #evaluate())?  I can add this later, or just stick something in
the current user docs.

WILL



--
Forio Business Simulations

Will Glass-Husain
[EMAIL PROTECTED]
www.forio.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to