Search code examples
liferayfreemarkerportletliferay-themeliferay-7

How to embed portlets correctly to a Liferay 7 theme template?


The blank theme Yeomann generates, has a basic <@liferay.breadcrumb/> tag, and I could even see <@liferay.dockbar/> in some Freemarker template files...

Since I couldn't find any documentation regarding these tags, let's call them "shorthands".

Question 1.: Where can someone find a list / library of all usable "shorthands" which enable the easiest way of embedding portlets to templates?

I know, there is the possibility to write something like this for embedding a Web Content Display:

<@liferay_portlet["runtime"]
    defaultPreferences="${freeMarkerPortletPreferences}"
    portletProviderAction=portletProviderAction.VIEW
    instanceId="uniquename1"
portletName="com_liferay_journal_content_web_portlet_JournalContentPortlet" />

It's just huge, and there is no documentation about which property means what, how this functions under the hood, and where can one find other implemented portlet class names (Portlet IDs if you wish).

Question 2-3.: Since I might be wrong, could someone please link a detailed documentation (other than this one because there's no explanation)/forum entry and/or a list of all the portlet class names so people shouldn't check by adding any portlet to the content of the page and verify the id from the HTML code? Could someone explain in depth how the above tag works and give an other example referring to an other portlet? Appreciations!


Solution

  • There is no full documentation for your question but you can check:

    What is macros and how to use them : Here

    Some Freemarker Macros : Here

    I hope it helps