Geir Magnusson Jr. wrote:
On Friday, February 7, 2003, at 04:10 AM, [EMAIL PROTECTED] wrote:
I have a small dump.vm template that formats the context content (and
some servlet/application specific stuff). All it needs is $context
placed in the context and the call it.
It would be very nice to have a #context()...#end directive that
just puts the context into the context to get dumps of a local
chained context (for example wihtin a #foreach loop or after a
#local directive). Such a #context directive is *very* trivial.
I don't get it - what do you want it to do? Couldn't you put the
context in the context to start with?
That's what I'm doing now. But if I have nested #foreachs and #locals
and I want to debug and dump the state, that context is not the
topmost, so it's missing some variables. A trivial #context directive
would solve this restriction.
Geir, is there some way of specifying the applicable directives
outside of the vel.jar file, e.g. from the velocity.properties?
Definitely. DVSL does this. It's 'userdirective'.
so in code, DVSL does :
ve.setProperty("userdirective",
"org.apache.tools.dvsl.directive.MatchDirective");
ve.init();
Thanks for this tip.
Does this also apply to the standard VelocityEngine?
geir
--
:) Christoph Reck
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]