How do I add a custom portlet in Liferay theme?
How do I add a custom portlet in Liferay theme?
You must create a module that can find the portlet that fits the theme’s request.
- Create an OSGi module.
- Create a unique package name in the module’s src directory, and create a new Java class in that package.
How do I add a portlet to Liferay 7?
Adding Portlet To Product Menu In Liferay 7 DXP
- Step 1 : Create A Portlet. Create A Portlet Which needs to added to the Product Menu.
- Step 2 : Add Dependency. Add the below Gradle Dependency to the Portlet, This Dependency is mandatory.
- Step 3 : Create ProductAdminPanelApp Component Class.
How do you get a portlet name in Liferay?
Liferay also constructs the ID with the help of the portlet name. For example: If your portlet name is MyWork defined in portlet. xml and the generated file in the webapps folder (if you are using tomcat) is MyWork-portlet then the resultant Id will be MyWork_WAR_MyWorkportlet .
How do I embed a portlet into a theme?
Embedding a Portlet by Portlet Name
- Open the FreeMarker theme template that you want to embed the portlet in. ( portal_normal. ftl is a good choice.
- Add the liferay_portlet[“runtime”] macro to the template, as shown below. The portlet name must be the same as javax.portlet.name ‘s value.
How do I create a MVC portlet in Liferay 7?
Creating MVC-Portlet Module In “Project name” enter appropriate name for portlet e.g. “employee-mvc-portlet” and in “Project Template Name” select “mvcportlet”, then click finish button. Resource folder holds JSP pages that performs “view” part in our portlet. The java file “EmployeePortlet.
How do you make a simple portlet in Liferay?
Creating a Liferay MVC Portlet in Liferay IDE
- Go to File → New → Liferay Plugin Project.
- Fill in the Project name and Display name.
- Leave the Use default location checkbox checked.
- Select the Ant (liferay-plugins-sdk) option for your build type.
- Your configured SDK and Liferay Runtime should already be selected.
Does Liferay use spring?
Note: If you want to use a Spring Framework version different from the version Liferay DXP provides, you must name your Spring Framework JARs differently from the ones portal property module. framework. Understanding Excluded JARs explains how to detect Liferay DXP’s Spring Framework version.
Is Liferay easy?
To keep this first application simple, you’ll implement this using a part of the Portlet API called Portlet Preferences. Normally, of course, you’d use a database, and Liferay makes it very easy to work with databases using its Service Builder framework.
How do you deploy a module in Liferay?
Deploying Modules with Liferay Developer Studio
- Select the module from the Package Explorer window and drag it to your Liferay server in the Servers window. Figure 1: You can use the drag-and-drop method to deploy your module to Liferay DXP.
- Right-click the server from the Servers window and select Add and Remove….