“I have more than 30 pages already created that use Liferay’s default master page, and I needed to create a new one. Is there an option to make this change replicate to all of them automatically?”
Question came through Slack. Posted for a Community member in Brazil.
2 Answers
2
Hello, everyone. This topic piqued my curiosity, so I decided to create a JSP portal to help us address this gap.
This module contains a JSP portlet for bulk Master Page administration in Liferay.
The goal of the portlet is to allow the user to:
-
view the Master Pages available in the site
-
select multiple pages through checkboxes
-
apply a Master Page in bulk to the selected pages
This project setup was built for:
Because of that, this branch already follows the newer platform changes related to the migration from javax to jakarta, including updated APIs and imports such as jakarta.portlet.*.
There will be another branch in this repository focused on Liferay 2025 portal versions, which still use javax.
https://github.com/wesleyroberts/master_page_tool
Hello @AnneDurey,
Currently, there is no out-of-the-box method available for bulk updating the master page template for existing pages. However, this can be achieved through a custom script using this service: liferay-portal/portal-kernel/src/com/liferay/portal/kernel/service/LayoutLocalServiceUtil.java at master · liferay/liferay-portal · GitHub
Cheers!
Hello, everyone. This topic piqued my curiosity, so I decided to create a JSP portal to help us address this gap. https://github.com/wesleyroberts/master_page_tool
– Wesley_Roberts