Deactivating and activating custom modules for a particular site in Liferay 7.4 (Part 1)
In Liferay 7.4 we can deactivate or activate a module for Liferay portal. This can be done using the components and app manager section from the control panel.
But Liferay doesn’t provide any feature to activate or deactivate a module for a particular site. As it can be a necessary thing when we have multiple sites and want to limit modules for that. To achieve this in Liferay we must create a panel module, service builder and theme. In the following part we will create a panel module to list all custom modules and to give user the access to disable a module on a particular site. In second part we will create a service builder and theme.
Creating a panel module (IntelliJ)
To show and let users perform action we need a module to display portlets and take user action.
To create a panel module this are the following steps:
- Go to File -> New -> Module
- Select Liferay Modules
- This will create a panel module
- After this to see all modules in view we need to add a render method that will give the list of all custom modules present on the portal.
The portlet will look like this:
Conclusion
We have created a module to list all the custom modules and let the users have access to activate and deactivate modules for a particular site. In part 2 we will create a service builder and theme.
Originally published by: https://www.inexture.com/deactivating-and-activating-liferay-objects/






Comments
Post a Comment