留言板

Asset Publisher: Navigate to page containing article

Rajesh Bangaram,修改在12 年前。

Asset Publisher: Navigate to page containing article

Junior Member 帖子: 71 加入日期: 11-3-8 最近的帖子
Hello everyone,

In Asset Publisher, i have articles shown by tag name. When i click on title of article, it has to navigate to the page containing the article.
I am using Liferay v6.0.6.

Can anyone say how it can be achieved?

Thanks in advance.

-Regards
Rajesh
thumbnail
Thiago Leão Moreira,修改在12 年前。

RE: Asset Publisher: Navigate to page containing article

Liferay Legend 帖子: 1449 加入日期: 07-10-10 最近的帖子
Hi Rajesh,

Since an asset (articles) can be placed in more than one page would be impossible redirect the user to the correct page so Asset Publisher does not support this behavior.
Rajesh Bangaram,修改在12 年前。

RE: Asset Publisher: Navigate to page containing article

Junior Member 帖子: 71 加入日期: 11-3-8 最近的帖子
Hi Thiago,

Thanks for your reply.

I am able to fetch the layoutUrl and able to navigate to the page. Below is code i used.

List<Long> hitLayoutIds = JournalContentSearchLocalServiceUtil.getLayoutIds(
articleDisplay.getGroupId(), false, articleDisplay.getArticleId());
if (hitLayoutIds.size() > 0) {
Long hitLayoutId = hitLayoutIds.get(0);
Layout hitLayout = LayoutLocalServiceUtil.getLayout(
layout.getGroupId(), layout.isPrivateLayout(),
hitLayoutId.longValue());
layoutUrl = PortalUtil.getLayoutURL(hitLayout, themeDisplay);
}

I am inspired by the search functionality in liferay.

-Regards
Rajesh
thumbnail
Thiago Leão Moreira,修改在12 年前。

RE: Asset Publisher: Navigate to page containing article

Liferay Legend 帖子: 1449 加入日期: 07-10-10 最近的帖子
That works but you will always get the first page, right? If meets your requirement that's great!