legacy-knowledge-base
公開されました Sep. 10, 2025

${device} Freemarkerテンプレートでデバイスデータを返さない

written-by

Alfonso Crisci

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

問題

  • Freemarker指令 ${device} 、その結果の内容をインターフェースで確認する場合、実際のデバイスデータは返されません:
    {brand=unknown, browser=unknown, browserVersion=unknown, model=unknown, os=unknown,
    osVersion=unknown, pointingMethod=unknown, qwertyKeyboard=true, screenPhysicalSize={height=-1.0,
    width=-1.0}, screenResolution={height=-1.0, width=-1.0}, tablet=false}

環境

  • Liferay DXP 7.0
  • Liferay DXP 7.1
  • Liferay DXP 7.2

解像度

  • Freemarkerコール ${device} を機能させるデバイス検出機能は、 Liferay Mobile Device Detection Liteのインストール後に動作します。 プラグインには、約20万種類のデバイスの組み合わせ(デバイス、ソフトウェア、ブラウザの組み合わせ)と60種類のプロパティが含まれています。 この場合、最初に閲覧した端末から記録された情報が他の端末でも表示されることになります:

    disable_cacheable.png

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base