How to get content metadata from Asset Publisher template

Issue

  • We are designing an Asset Publisher template and we would need to get content metadata available to configure an Asset Publisher.

Environment

  • DXP 7.4

Resolution

  • The information about Asset Publisher widget preferences just as every widget which supports Display Templates, is available through 'portletPreferences' variable.
  • A code example to get selected metadata could be following:
<#list portletPreferences["metadataFields"] as metafield>
    ${metafield} 
</#list>    

 

 

 

这篇文章有帮助吗?
0 人中有 0 人觉得有帮助