Is there any difference between sitegroupId and scopegroupId ?

thumbnail
Abhishek Jain, modified 7 Years ago. Regular Member Posts: 226 Join Date: 8/20/16 Recent Posts

I want to know that whether there is any difference between siteGroupId and scopeGroupId returned by themeDisplay object..Can they be different in any case? Please help me ..thanks in advance..

thumbnail
Olaf Kock, modified 7 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
Abhishek Jain:

I want to know that whether there is any difference between siteGroupId and scopeGroupId returned by themeDisplay object..Can they be different in any case?

A wild but educated guess: While the scoping by site is very common, you can also create a "subscope" by page. I've rarely seen this in the wild, but it exists. If you're not using this feature, they'll probably be the same each time. But if you use subscopes, they might be different.

Check this, for example, by dropping a Message Board portlet on any page, go to its configuration and choose the page name as scope. Then drop the same portlet on another page: They'll have different content, because they're stored in a different scope (but in the same site).

 

 

thumbnail
Minhchau Dang, modified 7 Years ago. Liferay Master Posts: 598 Join Date: 10/22/07 Recent Posts
Abhishek Jain:

I want to know that whether there is any difference between siteGroupId and scopeGroupId returned by themeDisplay object..Can they be different in any case?

There is only a difference for portlets that are scopeable, where they can be any of the scopes listed in that documentation. A popular selection other than the default is "Global", which at the Liferay code level is treated as a community/site to hold data.

Usually they're the same unless someone specifically uses the portlet configuration UI and sets them to be different, though there have been cases of bugs where the scope for one portlet doesn't get reset and bleeds into other portlets on the page (such as LPS-78980).