Alfresco 6.0.1. I'm trying to get the node reference for the current user's home in the repository, from a form control?
So suppose I have the following form configuration in share-config-custom.xml
<config>
<forms>
<dependencies>
</dependencies>
<form id="uploadMIForm">
<field-visibility>
<show id="miNode" />
</field-visibility>
<appearance>
<field id="miNode" label-id="prop.search.cm_search_in_folder" >
<control template="controls/managementinfo/picker.ftl">
</control>
</field>
</appearance>
</form>
</forms>
</config>
And the controls/management/picker.ftl has a configuration option
picker.setOptions(
...
parentNodeRef: "workspace://SpacesStore/a3c5f348-355d-4e7d-86a7-8e55bafd4662",
...
)
Question is, how do I dynamically get a node reference for the user's home, rather than hardcode it?
I've tried accessing the 'userhome' object in my ftl, according to the Alfresco Freemarker API reference documentation -
https://docs.alfresco.com/6.0/references/API-FreeMarker-defaultmodel.html
So from this, I expect that the statement
parentNodeRef: ${userhome.properties.nodeRef},
To do the job. But unfortunately I get a run time error as it evaluates to null.
Where am I going wrong? And how do I get this elusive node reference?