Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Priyanka Dhingra
OOTB portlets instanceable
March 29, 2012 2:16 AM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

Hi,

I know the we can make out out of the box portlets instanceable by manually editing ROOT/WEB-INF/liferay-portlet.xml
but my problem is that when we'll upgrade to some other version it would be a problem and since there are licensed version of liferay also we cannot modify the aforesaid xml file just like that.

So, is there any other way I can make any OOTB portlet instanceable or non-instanceable.(like hooks or something else)

Any help would really be apprecaited.

Thanks in advance
Priyanka
Priyanka Dhingra
RE: OOTB portlets instanceable
April 10, 2012 1:16 AM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

If what I am thinking and asking is not apt and is not the right direction...Do comment
Sandip Patel
RE: OOTB portlets instanceable
April 11, 2012 2:56 AM
Answer

Sandip Patel

Rank: Regular Member

Posts: 171

Join Date: January 4, 2011

Recent Posts

Hi Priyanka Dhingra,

For this you have to override liferay-portlet.xml to liferay-portlet-ext.xml by using ext, and change portlet <instanceable> tag.
David H Nebinger
RE: OOTB portlets instanceable
April 11, 2012 6:12 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7153

Join Date: September 1, 2006

Recent Posts

Priyanka Dhingra:
If what I am thinking and asking is not apt and is not the right direction...Do comment


The real question is why would you want to do this?

Instantiable controls whether you can have only one instance of a portlet on a given page or whether multiple instances per page are allowed.

For example, web content can be on a page multiple times, and that makes sense. Each one can contain different content, so they are each separate instances.

Mail on the other hand only makes sense to have a single instance on a page (yes, users can have multiple mail accounts, but all of the accounts listed in separate mail portlets on a single page would be pretty confusing).

For all of the Liferay portlets, I think they've done a pretty good job determining which ones can be multiples and which ones should allow only a single instance.

So it gets back to the question, why would you want to do this?
Priyanka Dhingra
RE: OOTB portlets instanceable
April 12, 2012 1:58 AM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

Hi David,
This was a question asked to me. I knew the method i mentioned in post but was trying to see if any better alternative available.. I am a Liferay beginner so there is a possibility that the solution I am trying may not be always efficient.

Thanks
Priyanka
Riccardo Ferrari
RE: OOTB portlets instanceable
April 12, 2012 3:17 AM
Answer

Riccardo Ferrari

Rank: Regular Member

Posts: 137

Join Date: November 13, 2010

Recent Posts

Hi,
I think that the "instaceable" behavior of a portlet is tightly coupled with its business logic. Are you sure you want to change this setting? Are you referring "instanceable" as the ability to add a portlet instance to a portal page?
Hitoshi Ozawa
RE: OOTB portlets instanceable
April 12, 2012 7:45 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

You're talking about modifying just the settings and not the source code.