[xwiki-users] How to access util binding from velocity
Hi all, Is there a way I can configure my setup to allow me to access the util binding from within Velocity? I've searched around in the documentation and can't seem to find it. I really just want to create a map - and whilst I can do it in Groovy, it'll be easier for users if they can do it using velocity. Any advice? Cheers, Adam
Hi Adam, On 02/03/2011 02:56 PM, [email protected] wrote:
Hi all,
Is there a way I can configure my setup to allow me to access the util binding from within Velocity? I've searched around in the documentation and can't seem to find it.
I really just want to create a map - and whilst I can do it in Groovy, it'll be easier for users if they can do it using velocity.
Do you really need a utility class? I just tried this: {{velocity}} #set($map = {'name':'marius'}) $map.name {{/velocity}} Hope this helps, Marius
Any advice?
Cheers,
Adam
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On 02/03/2011 01:56 PM, [email protected] wrote:
Hi all,
Is there a way I can configure my setup to allow me to access the util binding from within Velocity? I've searched around in the documentation and can't seem to find it.
If by util you mean com.xpn.xwiki.api.Util, then that's $util.
I really just want to create a map - and whilst I can do it in Groovy, it'll be easier for users if they can do it using velocity.
Any advice?
Cheers,
Adam
-- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (3)
-
Marius Dumitru Florea -
Sergiu Dumitriu -
xwikiadmin@lazypapertiger.org