Run Velocity code in Liferay Web Content

476 Views Asked by At

I've a web content and I'd like to import another portlet inside of my web content. Is that possible?

I've tried using the code:

#set($TopNaviC = $journalContentUtil.getContent($themeDisplay.getCompanyGroupId(),'11105', null, "$locale",$theme_display)) 
$TopNaviC

Yours Heikki

2

There are 2 best solutions below

0
On

You can archieve that with:

<div id="embedded-welcome-portlet">
  <runtime-portlet name="56" instance="5555" queryString=""/>
</div>

...where...

  • name = this name belongs to journal content as stated in /WEB-INF/liferay-portlet.xml
  • instance = 4 digit number
3
On

This is a correct example

#set ($local_temp_content = $journalContentUtil.getContent($scope_group_id, $temp_article_id, null, "$locale", $theme_display))