How do I embed a portlet in a theme in Liferay?

Embedding a Portlet by Portlet Name

  1. Open the FreeMarker theme template that you want to embed the portlet in. ( portal_normal. ftl is a good choice.
  2. 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 add a portlet to Liferay 7?

Follow below step for add portlet in control panel

  1. Go to Liferay workspace project → modules → new.
  2. Select other → Liferay → Liferay Module Project and click on “Next”.
  3. Select “Project Template Name” as “mvc-portlet” and click on “Next”.
  4. Enter a Package name and click on “Finish”.

How do you get portlet preferences in Liferay?

In order to add a configurable portlet preference to the portlet, you must do the following things:

  1. Specify a Configuration JSP in the portlet.
  2. Create the Configuration JSP for Displaying the Portlet Preference Options.
  3. Create a Configuration Action Implementation Class for Processing the Portlet Preference Value.

How do you get a portlet name in Liferay?

To get the ID of the portlet that performs an action on an entity, pass that entity and action as arguments to the PortletProviderUtil method getPortletId . For example, this call gets the ID of a portlet for viewing Recycle Bin entries: String portletId = PortletProviderUtil.

How do you make a portlet in Liferay?

Creating a Liferay MVC Portlet in Liferay IDE

  1. Go to File → New → Liferay Plugin Project.
  2. Fill in the Project name and Display name.
  3. Leave the Use default location checkbox checked.
  4. Select the Ant (liferay-plugins-sdk) option for your build type.
  5. Your configured SDK and Liferay Runtime should already be selected.

How do I set portlet preferences?

In order to add a configurable portlet preference to the portlet, we must do the following things:

  1. Specify a Configuration JSP in the portlet.
  2. Create the Configuration JSP for Displaying the Portlet Preference Options.
  3. Create a Configuration Action Implementation Class for Processing the Portlet Preference Value.

What is portlet in Liferay?

Web apps in Liferay DXP are called portlets. Like many web apps, portlets process requests and generate responses. In the response, the portlet returns content (e.g. HTML, XHTML) for display in browsers. Another difference is that portlets run only in a portal server, like the one in Liferay DXP.

What is MVC portlet in Liferay?

MVC Portlet applications are web modules containing at least one portlet class that’s registered in Liferay’s runtime environment as a component. Web modules describe themselves using standard OSGi metadata and can use any build environment.

How do you make a simple portlet in Liferay?

What is portlet Web application?

Portlets are reusable web modules that provide access to Web-based content, applications, and other resources. From an application development perspective, portlets are pluggable web modules that are designed to run inside a portlet container of any portal framework.

What is a portlet in programming?

Portlets are pluggable user interface software components that are managed and displayed in a web portal, for example an enterprise portal or a web CMS. Portlets produce fragments of markup (HTML, XHTML, WML) that are aggregated into a portal.

You Might Also Like