Heikki Mustonen
Heikki Mustonen

Reputation: 311

Run Velocity code in Liferay Web Content

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

Upvotes: 0

Views: 471

Answers (2)

Daniele Baggio
Daniele Baggio

Reputation: 2257

This is a correct example

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

Upvotes: 0

moisesbelda
moisesbelda

Reputation: 126

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

Upvotes: 1

Related Questions