legacy-knowledge-base
公開されました Jun. 30, 2025

Asset Publisherテンプレートからコンテンツ・メタデータを取得する方法

written-by

Sergio Alonso

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • アセット・パブリッシャー・テンプレートを設計しており、アセット・パブリッシャーを構成するために利用可能なコンテンツ・メタデータを取得する必要があります。

環境

  • DXP 7.4

解像度

  • ディスプレイ・テンプレートをサポートするすべてのウィジェットと同様に、アセット・パブリッシャー・ウィジェットのプリファレンスに関する情報は、'portletPreferences'変数を通して利用可能です。
  • 選択されたメタデータを取得するコード例は次のようになる:
<#list portletPreferences["metadataFields"] as metafield>
    ${metafield} 
</#list>    

did-this-article-resolve-your-issue

legacy-knowledge-base