How to get custom metadata from asset object
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2010 04:44 AM
Hello Team,
I am customizing the Alfresco Share edit page and hence working on "/webapps/share/js/documentlibrary-actions.js" file.
As you know, asset object represents Alfresco content and we can get content's fileName, type etc thorugh it.
But I want to get the custom metadata information from an asset object.
Could anyone please provide me the code for the same?
I am customizing the Alfresco Share edit page and hence working on "/webapps/share/js/documentlibrary-actions.js" file.
As you know, asset object represents Alfresco content and we can get content's fileName, type etc thorugh it.
But I want to get the custom metadata information from an asset object.
Could anyone please provide me the code for the same?
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2010 05:27 AM
You need to override alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/item.lib.ftl within the Repository webapp (/alfresco) to return your custom metadata.
Thanks,
Mike
Thanks,
Mike
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2010 09:38 AM
Thanks Mike.
I did the change in the file specfied as below but I got value as undefined.
Any help would be highly beneficial for me.
I did the change in the file specfied as below but I got value as undefined.
"application":"${node.properties.application!""}",
And I have gotten error message when I was trying to include the URI path to the custom metadata.Any help would be highly beneficial for me.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2010 09:55 AM
Yes, that won't work as only a few properties are exposed as public getters in ScriptNode.class.
Try
Remember to convert to string (if appropriate) and add null handling for Freemarker.
Thanks,
Mike
Try
node.properties["foo:bar"]
Remember to convert to string (if appropriate) and add null handling for Freemarker.
Thanks,
Mike
