Forums de discussion
Liferay Javascript - How to get global scope ID?
Gwowen Fu, modifié il y a 9 années.
Liferay Javascript - How to get global scope ID?
Expert Publications: 315 Date d'inscription: 27/12/10 Publications récentes
Hi,
I need to create a renderURL for an article stored in Global scope.
The following code will not work because the group ID is the site user logged in, not the global site.
How could I get the global scope ID from Liferay Javascript?
Thank you!
Gwowen
I need to create a renderURL for an article stored in Global scope.
The following code will not work because the group ID is the site user logged in, not the global site.
How could I get the global scope ID from Liferay Javascript?
var url = Liferay.PortletURL.createRenderURL();
url.setPortletId("56");
url.setWindowState('EXCLUSIVE');
url.setParameter("_56_groupId", themeDisplay.getScopeGroupIdOrLiveGroupId());
url.setParameter("_56_articleId", articleId);
Thank you!
Gwowen
Gwowen Fu, modifié il y a 9 années.
RE: Liferay Javascript - How to get global scope ID? (Réponse)
Expert Publications: 315 Date d'inscription: 27/12/10 Publications récentes
Found the answer.
var url = Liferay.PortletURL.createRenderURL();
url.setPortletId("56");
url.setWindowState('EXCLUSIVE');
url.setParameter("_56_groupId", themeDisplay.getCompanyGroupId());
url.setParameter("_56_articleId", articleId);