Thursday 28 August 2014

Liferay include portlet in theme

Configure the below statement in portal_normal.vm file

 #set ($VOID = $velocityPortletPreferences.setValue('portletSetupShowBorders', 'false'))
#set ($portlet_id = 'Mention Your ID here')
#set ($my_portlet_id = "${portlet_id}_INSTANCE_1234")
$theme.runtime($my_portlet_id, "", $velocityPortletPreferences.toString())
$velocityPortletPreferences.reset()

ID Location---->Goto ControPanel->Plugins Configuration->Select your portlet and click->and copy Plugin ID and paste it in place of  'Mention Your ID here'

If you want to call 2 custom portlet or other portlet you need to follow the same steps and change the INSTANCE_1234 to some other number like INSTANCE_5678 something like this

1 comment: