Foros de discusión

How to remove embedded portlets

Sebastian Bayerlein, modificado hace 8 años.

How to remove embedded portlets

New Member Mensajes: 19 Fecha de incorporación: 13/11/07 Mensajes recientes
Hello,

I'm using Liferay CE 6.2.3. I added a portlet programmatically to a common JSP, which is included in every page of the portal, like this:

<liferay-portlet:runtime portletName="xxxportlet_WAR_yyyportlet" queryString="${renderAction}" />

Now, everytime I'm requesting a page, a new instance of this portlet is created. When sending an event the portlets, the event is received by all instances.

My questions are:
- Is it possible to create only one instance of the embedded portlet?
- How can I remove existing instances from the system? Although the portlet is no more on the page, the instances are still available.

Best Regards,
Sebastian
thumbnail
Devang Patel, modificado hace 8 años.

RE: How to remove embedded portlets

Regular Member Mensajes: 247 Fecha de incorporación: 19/01/15 Mensajes recientes
Hi Sebastian Bayerlein,
Login as administrator.
and then click on edit from liferay admin dockbar.
There is one option for embeded portlet and check that portletName and save it & Reload the page.
See in attached image.
HTH.

Thanks & Regards,
Devang Patel

Archivos adjuntos:

thumbnail
Anil Sunkari, modificado hace 8 años.

RE: How to remove embedded portlets (Respuesta)

Expert Mensajes: 427 Fecha de incorporación: 12/08/09 Mensajes recientes
Hi Sebastian Bayerlein,


Hope below info will be useful.

1)Since you are saying it is required in all the pages. I suggest only when we are fetching/rendering less content.
You can use the below code in theme like below with unique instance id.

$theme.runtime('portletInstanceId',"","Preferences")


2) When you remove page through admin obvioously all the related info will get updated in liferay db.if not then you need to manually remove it.

(or)
You can use Iframe in your jsp page.

Regards,
Anil Sunkari