留言板

How to get layout(page) name from FriendlyURL ?

thumbnail
Vikas Kadam,修改在12 年前。

How to get layout(page) name from FriendlyURL ?

New Member 帖子: 22 加入日期: 11-6-15 最近的帖子
Hi,
I'm new to liferay. Would someone please tell me how to get layout(page) name from FriendlyURL? I have a FriendlyURL for a web content and I want to find out the page name (layout ) for the same.

Thanks.
-Vicky
thumbnail
jelmer kuperus,修改在12 年前。

RE: How to get layout(page) name from FriendlyURL ?

Liferay Legend 帖子: 1191 加入日期: 10-3-10 最近的帖子
You can use

LayoutLocalServiceUtil.getFriendlyURLLayout(long groupId, boolean privateLayout, String friendlyURL)
thumbnail
Anil Sunkari,修改在12 年前。

RE: How to get layout(page) name from FriendlyURL ?

Expert 帖子: 427 加入日期: 09-8-12 最近的帖子
Hi Vikas,

Vikas Kadam:
Hi,
I'm new to liferay. Would someone please tell me how to get layout(page) name from FriendlyURL? I have a FriendlyURL for a web content and I want to find out the page name (layout ) for the same.

Thanks.
-Vicky



you can also get the page name simplay if you have themeDispay object like mentioned below.

String title = themeDisplay.getLayout().getName(themeDisplay.getLocale());

Regards,
Anil Sunkari
thumbnail
Vikas Kadam,修改在12 年前。

RE: How to get layout(page) name from FriendlyURL ?

New Member 帖子: 22 加入日期: 11-6-15 最近的帖子
Thanks Anil,
It gives LayoutId for current page.

I need the LayoutId for particular friendlyURL. You can get it using
PortalUtil.getPlidFromFriendlyURL(themeDisplay.getCompanyId(), friendlyURL);
emoticon
thumbnail
Aritz Galdos,修改在12 年前。

RE: How to get layout(page) name from FriendlyURL ?

Expert 帖子: 416 加入日期: 07-5-15 最近的帖子
Hi Vikas:

I guess this is what you need..

LayoutLocalServiceUtil.getFriendlyURLLayout(long groupId, boolean privateLayout, String friendlyURL)

Ofcourse, you'll need the groupId and you'll need to specify if the layout is in the pri or pub layoutset.

regards!!