[MGNLDAM-604] Name of Asset is not available via DAM API Created: 22/Jul/15 Updated: 23/Aug/22 |
|
| Status: | Open |
| Project: | Magnolia DAM Module |
| Component/s: | DAM API |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Christopher Zimmermann | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||
| Date of First Response: | |||||||||||||
| Team: | |||||||||||||
| Description |
|
The Edit dialog in the Assets detail subapp allows editing the "name" property of an Asset, but not the name of the Node. This is saved on the node as the "name" property. But its not possible to retrieve the "name" property via the Asset API's. From the Asset object: From the AssetMap: Workaround: Currently a templater would have to do something like extract the JCR id from the identifier and grab the actual node directly from the workspace. ( ie cmsfn.contentById(String id, String workspace) |
| Comments |
| Comment by Jonathan Ayala [ 10/Jun/21 ] |
|
As a workaround you can use asJCRNode method to get the actual node and thus, its name property. The following sample script would iterate over assets under a given folder and would create links with asset name property: [#assign folder = cmsfn.contentByPath("/destinations", "dam")] <ul> [#list cmsfn.children(folder, "mgnl:asset") as child ] [#assign currentNode = cmsfn.asJCRNode(child)] <li><a href="${cmsfn.link(child)}">${currentNode.getProperty('name').getString()!}</a></li> [/#list] </ul> |