3

I want to create a new page using Web Content Display with Velocity Templates and Structures.

On my page I would like to have multiple tabs and on each tab needs to be added programatically from a template of an existing portlet.

I know how to add an existing portlet to my theme ($theme.runtime("portlet_id")) but I can't find a way to add the portlets to a velocity template since $theme object is not available in a Web Content Display template.

Can you please tell me if it is possible to add a portlet to a template?
If yes, how?

Thank you.

Prakash K
  • 11,669
  • 6
  • 51
  • 109
user1694543
  • 31
  • 1
  • 2

1 Answers1

6

You can use the runtime-portlet tag in the velocity templates:

<div id="portlet-inside-wc">
  <runtime-portlet name="portlet-id" instance="instanceID" queryString=""/>
</div>

Where name is the portlet ID, instance is the 4 letter unique (Alpha Numeric) word and Querystring can be portlet preferences.

Sharana
  • 749
  • 3
  • 8