I want to get a friendly url for a layout based on a layout id. For example, / web / group / page. I am currently doing this:
Layout layout = LayoutLocalServiceUtil.getLayout(groupId, false, layoutId);
String groupFriendlyUrl = GroupLocalServiceUtil.getGroup(groupId).getFriendlyURL();
String layoutFriendlyUrl = layout.getFriendlyURL();
String webFriendlyUrl = String.format("/web%s%s", groupFriendlyUrl, layoutFriendlyUrl);
I am wondering if there is a better way to do this when I can use the full path, / web / group / page in one way.
source
share