0
votes

Is it possible in Liferay using Freemarker template language to embed portlets into portlets (not theme) ? I need to dynamically include portlets based on some query string or session.

I saw the in the Velocity world, they are doing it like this:

<div id="...">
    <runtime-portlet name="..." instance="..." queryString="..."/>
</div>

I also tried this way, but im getting "Expression theme.runtime is undefined" error.

${theme.runtime("portlet-id")}

I have seen solutions using iframe, but i dont really like it.

My environment:

  • Liferay 6.2 ga2
  • Portlet is built using Spring MVC + Freemarker
  • JAVA 7

Any help or pointers would be really appreaciated.

1

1 Answers

0
votes

Please refer below link, you need to modify $theme.runtime() method with additional parameters.

https://www.liferay.com/community/wiki/-/wiki/Main/Embedding+a+portlet+in+the+theme