You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Lee van der Veen <le...@metrex.net> on 2006/06/19 18:37:06 UTC

Adding additional macro libraries

Is there any way to add an additional macro library into the Velocity 
engine at runtime?

-- 

Lee


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Adding additional macro libraries

Posted by Lee van der Veen <le...@metrex.net>.
Thanks for your help!  That definitely gives me something to work with.


On Monday 19 June 2006 2:57 pm, Nathan Bubna wrote:
> yes and no.  i'm pretty sure there is no way to register and process
> an additional file for your velocimacro.library property.
>
> however, if you set up your velocimacro properties right, you can add
> additional velocimacros to your global library by simply merging the
> new library template (with any context) using the velocity engine you
> wish to add them too.
>
> the properties in question are:
> velocimacro.permissions.allow.inline = true
> velocimacro.permissions.allow.inline.to.replace.global = true
> velocimacro.permissions.allow.inline.local.scope = false
>
> If your VelocityEngine has these properties set and then performs a
> merge (i.e. evaluates) the new library, then that will be equivalent
> to having added an additional macro library to your
> velocimacro.library property.
>
> Read more about the properties involved here:
> http://jakarta.apache.org/velocity/docs/developer-guide.html#Velocity%20Con
>figuration%20Keys%20and%20Values
>
> On 6/19/06, Lee van der Veen <le...@metrex.net> wrote:
> > Is there any way to add an additional macro library into the Velocity
> > engine at runtime?
> >
> > --
> >
> > Lee

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Adding additional macro libraries

Posted by Nathan Bubna <nb...@gmail.com>.
yes and no.  i'm pretty sure there is no way to register and process
an additional file for your velocimacro.library property.

however, if you set up your velocimacro properties right, you can add
additional velocimacros to your global library by simply merging the
new library template (with any context) using the velocity engine you
wish to add them too.

the properties in question are:
velocimacro.permissions.allow.inline = true
velocimacro.permissions.allow.inline.to.replace.global = true
velocimacro.permissions.allow.inline.local.scope = false

If your VelocityEngine has these properties set and then performs a
merge (i.e. evaluates) the new library, then that will be equivalent
to having added an additional macro library to your
velocimacro.library property.

Read more about the properties involved here:
http://jakarta.apache.org/velocity/docs/developer-guide.html#Velocity%20Configuration%20Keys%20and%20Values

On 6/19/06, Lee van der Veen <le...@metrex.net> wrote:
> Is there any way to add an additional macro library into the Velocity
> engine at runtime?
>
> --
>
> Lee
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org