Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Smilelws2010 lwz
Number of instances of an instanceable portlet on the liferay site?
May 8, 2013 9:15 AM
Answer

Smilelws2010 lwz

Rank: Regular Member

Posts: 160

Join Date: December 16, 2010

Recent Posts

HI

I have a custom portlet with instanceable set to true and it runs fine.

Is it possible to get the number if instances of a particular porltlet running on liferay site? Also, if possible the display names of those portlets as well?

Could anyone help me on this, I would appreciate it very much.

Thanks
Smile
Apoorva Prakash
RE: Number of instances of an instanceable portlet on the liferay site?
May 8, 2013 9:42 PM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Smilelws2010 lwz:
HI

I have a custom portlet with instanceable set to true and it runs fine.

Is it possible to get the number if instances of a particular porltlet running on liferay site? Also, if possible the display names of those portlets as well?

Could anyone help me on this, I would appreciate it very much.

Thanks
Smile


Hello Smile,

See this link. This lets you count the number of portlets in a layout. So, you can try some modification and get a way around.

HTH.

Thanks and Regards,
Apoorva Prakash
Smilelws2010 lwz
RE: Number of instances of an instanceable portlet on the liferay site?
May 9, 2013 1:54 PM
Answer

Smilelws2010 lwz

Rank: Regular Member

Posts: 160

Join Date: December 16, 2010

Recent Posts

Thanks Apoorva.

The custom portlet can be anywhere on the portal, but following the link you gave, I found the same blog have something like all the porltets available. Maybe I should start playing with it.

Regards,
Smile
Smilelws2010 lwz
RE: Number of instances of an instanceable portlet on the liferay site?
May 10, 2013 7:38 AM
Answer

Smilelws2010 lwz

Rank: Regular Member

Posts: 160

Join Date: December 16, 2010

Recent Posts

Thanks Apoorva, it worked.

I can now get the portlet Ids of all the portlet in a particular Group only which was the requirement manipulating and playing around with code in the blog you mentioned. Now I just have to look for just my cusotm portlet from those.

Thanks and Regards
Smile

One doubt, could anyone tell the difference between themeDisplay.getScopeGroup() and themeDisplay.getParentGroup()? For the above I used getScopeGroup without really getting into the depth of it.

Appreciate all the help.
Apoorva Prakash
RE: Number of instances of an instanceable portlet on the liferay site?
May 10, 2013 1:26 PM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Hello Smile,

Smilelws2010 lwz:
Thanks Apoorva, it worked.
I can now get the portlet Ids of all the portlet in a particular Group only which was the requirement manipulating and playing around with code in the blog you mentioned. Now I just have to look for just my cusotm portlet from those.
.
Welcome

Smilelws2010 lwz:
One doubt, could anyone tell the difference between themeDisplay.getScopeGroup() and themeDisplay.getParentGroup()? For the above I used getScopeGroup without really getting into the depth of it.

ScopeGroup is the group from which the current layout belongs to. For knowing about getParentGroup, read this.

HTH.

Thanks and Regards,
Apoorva Prakash