Issue
You are using a Web Content Structure that was created in the Global site so it can be shared across multiple sites. You need to set a default Display Page Template (DPT) for this structure, but you want the default to apply only to content created within one specific site, without affecting any other sites that use the same Global Structure.
Environment
- Liferay DXP 7.4
- Quarterly Releases
Prerequisites
- You have an existing Web Content Structure created in the Global site.
- You have permissions to create Web Content Articles and Display Page Templates within the target Liferay site.
Resolution
Follow these steps within the specific site where you want the default to apply:
-
Navigate to the target site's administration menu.
-
Go to Content & Data > Web Content.
-
Create a temporary Web Content Article and, in the "Structure and Template" section, select your Global Structure. You don't need to add content; this is just to associate the structure with the site.
-
In the same site administration menu, navigate to Design > Page Templates.
-
Select the Display Page Templates tab.
-
Click the Add button (+) to create a new Display Page Template.
-
In the form, select Web Content Article as the Content Type. For the Subtype, choose your Global Structure from the dropdown list. Give your DPT a name (e.g., "News Article DPT for Site A") and click Save.
-
You will be taken to the page editor for the new DPT. Design the template by adding the necessary fragments and widgets (like the Asset Publisher) to display the structure's fields. Once your design is complete, Publish the DPT.
-
Return to the Display Page Templates list. Find your newly created DPT, click the Actions menu (⋮), and select Mark as Default
Verification
The default is now set at the site level. To confirm the solution works as expected:
-
In the current site: Create a new Web Content Article using the Global Structure. In the article's properties, you will see that your new DPT is automatically selected as the Display Page.
-
In any other site: Create a new Web Content Article using the same Global Structure. No Display Page will be selected by default, confirming that your change did not affect other sites.