velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Reck <>
Subject Re: Documentation for Directive
Date Wed, 27 Oct 2004 11:47:05 GMT
Ben wrote:
> Where can I find more information about Velocity Directive? I would
> like to write one but so far it doesn't work...
> I would like to do something like this:
> #useSomething("/WEB-INF/file.xml")
> #doSomething("nodeA")
> #doSomething("nodeB")
> #end
> I created two directives, one for #useSomething (as BLOCK) and the
> other for #doSomething (as LINE). Somehow Velocity doesn't parse
> #doSomething. What should I do to make my #useSomething recognize
> #doSomething?
> Thanks
> Ben

I guess you have note yet registered them in the velocity engine?

Look at
in the initializeDirectives() method how it loads the default and user directives.

Location of the resource defining the Default directives is in
Which points to the file:

An example of setting up an user directive is in:
in the method setStylesheet(Reader) and line:
   ve.setProperty("userdirective", "");
But it should be possible to setup several user directives in the file via the proper configuration-syntax use.

Another example of a configured user directory is in

Maybe an initial instruction for custom user directives could be placed
in the Wiki?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message