ナレッジベース
公開されました Jun. 30, 2025

Can Layouts Be Dynamically Assigned to Object Entries Based on Experience (e.g., User Role)?

written-by

David Simon

knowledge-article-header-disclaimer-how-to

knowledge-article-header-disclaimer

Issue

  • I’ve created an Object named TestObject and added two layouts: Test Layout 1 and Test Layout 2 in the Site Builder → Pages section.
  • Behavior observed:
    • If no layout is marked as default, the system uses the default Liferay layout — as expected.
    • If one is marked as default, it becomes the layout shown for the object entry.
  • What I’d like to achieve:
    • Use Experiences to assign different layouts to the same object entry based on the user role.
      • For example:
        • Role 1 should view the object entry using Test Layout 1
        • Role 2 should view the same object entry using Test Layout 2
  • Currently, I don’t see a way to define a layout for the object entry at the page level.

Environment

  • Liferay DXP 7.0+

Resolution

did-this-article-resolve-your-issue

ナレッジベース