runtime added portlets do not rendered when parent portlet has use-default-template value true

853 views Asked by At

I am working on a portlet which accepts the portlet ids and renders those portlets. So, basically you can think of something like a container portlet.

When the container portlet has a value <use-default-template>false</use-default-template> in liferay-portlet.xml, everything works fine. It is able to render the portlet via tag <liferay-portlet:runtime portletName="1_WAR_sampleportlet" />

But, if I make the entry <use-default-template>true</use-default-template> for the container portlet (or just remove the tag, as default is true), it simply ignore the <liferay-portlet:runtime /> tag and shows nothing.

The other information are

  • Liferay version : liferay 6.2 EE
  • Java version : Java 7
  • Portlet Type : Spring MVC portlet
1

There are 1 answers

2
Neeraj Gautam On

Please refer below links, as this question is already answered earlier in stackoverflow.

use-default-template configuration tag does not work

Also, not that if you disable "use-default-template" then Liferay is doing exactly what you requested: It does not display any default controls and only shows the content created by the portlet's render() method.

So if you need to have a configuration link (or a remove button or any other control present in the default template), your portlet has to render it on its own.