I want to add a custom porlet in my header of my liferay, but I don't know how to do it.
I know I can add just content in portal....vm. But for a entire portlet..
Is it possible ?
Thanks in advance.
I want to add a custom porlet in my header of my liferay, but I don't know how to do it.
I know I can add just content in portal....vm. But for a entire portlet..
Is it possible ?
Thanks in advance.
Use this line in your .vm theme file:
$theme.runtime($portletId, $queryString, $velocityPortletPreferences.toString())
You can get Portlet ID from "Look and feel" > "Advanced Styling" of your portlet
If it is something like: #portlet_welcome_WAR_Helloportlet
, you will use
welcome_WAR_Helloportlet
in place of ID in the theme.
To have more information on how this work and how to use correctly this approach i suggest to follow informations you can find here and here.
Of course it is possible !! You will have to embed the portlet from the thema for the header or leave the space to be able to enter there your portlet
You need the portlet ID to be able to use it in your header
Documentacion: https://web.liferay.com/es/community/wiki/-/wiki/Main/Embedding+a+portlet+in+the+theme