留言板

How to get url of webcontent to screen.

kumar Raju,修改在11 年前。

How to get url of webcontent to screen.

New Member 帖子: 17 加入日期: 12-9-28 最近的帖子
Hi All,

I have requirement to get content in liferay (i.e Webcontent).

I am able to fetch the web content name & summary (please refer attached snapshot), not able to get the url.

Can you please tell me how to get the url of web content to screen. On fetching the url to screen, by clicking it should open that webcontent.


Thanks & Regards
Kumar
kumar Raju,修改在11 年前。

RE: How to get url of webcontent to screen.

New Member 帖子: 17 加入日期: 12-9-28 最近的帖子
In assetEntry : there is attribute "url" which is getting empty.

Can you guys give some inputs from where the attribute "url" is coming & how to get the "url" of the Content.
Rahul Sharma,修改在11 年前。

RE: How to get url of webcontent to screen.

Junior Member 帖子: 59 加入日期: 12-1-11 最近的帖子
The simpler approach is that you can first click on the link of any of the webcontent, this will open the webcontent in the page then just take the current url by using PortalUtil.getCurrentUrl(),and in this url find for the parameter such as articleId and community Id/group Id,remove unneccessary parameters from this url and replace the article id which you had already got in your code for displaying different content and then use this new url.

Hope that helps!