留言板

Get Layout Object on private sites of user belongs to UserGroup

Morad Ahmad,修改在8 年前。

Get Layout Object on private sites of user belongs to UserGroup

Junior Member 帖子: 71 加入日期: 10-6-16 最近的帖子
In order to create a link to a private site of a user I must get the layout object of the site. The user belongs to a UserGroup.

For building a link as String I use :

StringBundler sb = new StringBundler();
String portalURL = PortalUtil.getPortalURL(themeDisplay);
sb.append(portalURL);
sb.append("/user/" + user.getScreenName());
sb.append("/~/" + userGroup.getUserGroupId() + "/" + friendlyURL);
String dashboardPath = sb.toString();
return dashboardPath;

which works fine. But how can I get the corresponded Layout-Object for this url??

Thanks,
Morad.
thumbnail
Julien Mourad,修改在8 年前。

RE: Get Layout Object on private sites of user belongs to UserGroup

Junior Member 帖子: 78 加入日期: 15-1-22 最近的帖子
Morad Ahmad,修改在8 年前。

RE: Get Layout Object on private sites of user belongs to UserGroup

Junior Member 帖子: 71 加入日期: 10-6-16 最近的帖子
yes, but what I need is a layout for a user belongs to a UserGroup.

LayoutLocalServiceUtil.getFriendlyURLLayout(user.getGroupId(), true, "/inbux");

doesn't return the layout for "/inbox" of the user, although there is a page with this URL on users private sites.
Thats because user sites derived from the UserGroup the user belongs to!


Thanks,
Morad.