Uploaded image for project: 'PUBLIC - Liferay Documentation'
  1. PUBLIC - Liferay Documentation
  2. LRDOCS-5906

Provide examples on how to embed out of the box DXP portlets in layout templates

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Fix Version/s: 7.0.x
    • Labels:
      None
    • Type of Documentation:
      Developer: Development Frameworks

      Description

      Hello Team,

      I am referring to this section of the docs:

      https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/embedding-portlets-in-themes-and-layout-templates#adding-a-portlet-to-a-custom-layout-template

      1) In order to embed an asset publisher, this code is necessary:

      $processor.processPortlet(
       "com.liferay.journal.model.JournalArticle",
        $portletProviderAction.VIEW
      )
      

      Could you please confirm this is the right way and, if it is, add it to the documentation? It is a way developers would not normally find immediately. You may find more background info at these links:

      https://issues.liferay.com/browse/LPS-68028
      https://in.liferay.com/web/global.engineering/forums/-/message_boards/view_message/24817201 (internal only)

      2) To add a Site Navigation Menu, I instead found this way:

      $processor.processPortlet(
       "com.liferay.portal.kernel.theme.NavItem",
        $portletProviderAction.VIEW
      )
      

      Could you please confirm if this is correct? Even for this case, developers may not always quickly figure out the right class to add.

      I understand that the question: How to find the correct class name for the portlet I want to embed in my .tpl layout template ? is partly covered here and here, however, please, if you notice any improvement possibilities, please proceed with updating the documentation.

      As an extra, it would be great if the docs could have a list of the right class to use for all the portlets Liferay DXP ships out of the box.

      Thanks and best regards,
      Alfonso

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                7.0.x