cancel
Showing results for 
Search instead for 
Did you mean: 

Can't Access Some AVM Node API Vars in FreeMarker

akindo
Champ in-the-making
Champ in-the-making
Hi all.

I am trying to use FreeMarker templates with web scripts to pull descriptions of folder and their paths. However, some AVM Node API variables (described in http://wiki.alfresco.com/wiki/Template_Guide#AVM_Node_API) do not work.

I have successfully used node.name, node.properties.name, and node.id. However, I can't use node.path for some reason. How do I get the path of a node using FreeMarker?

node.properties.description seems to work, except we can't store folder descriptions with latest version of Alfresco WCM 2.1.
2 REPLIES 2

kevinr
Star Contributor
Star Contributor
I've just checked and node.path is working fine for me in 2.1 (it simply returns a member variable). Do you definitely have an AVM node in your hand? If you do then node.id is identical to node.path for an AVM node (as the path IS the id in AVM world) so it should return you the path not a GUID.

Thanks,

Kevin

kvc
Champ in-the-making
Champ in-the-making
Hope Kev's comments helped and you've got this working!

If you've any tips and tricks (or code!) to share with anyone for the web script you are building, please do.  We'd like to get others to start leveraging web scripts, and so anything you can add to help others take the steps you are would be *excellent*.

Kevin