Can Layouts Be Dynamically Assigned to Object Entries Based on Experience (e.g., User Role)?
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.
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.
Did this article resolve your issue ?