Foros de discusión

How to get url of webcontent to screen.

kumar Raju, modificado hace 11 años.

How to get url of webcontent to screen.

New Member Mensajes: 17 Fecha de incorporación: 28/09/12 Mensajes recientes
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

Archivos adjuntos:

kumar Raju, modificado hace 11 años.

RE: How to get url of webcontent to screen.

New Member Mensajes: 17 Fecha de incorporación: 28/09/12 Mensajes recientes
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, modificado hace 11 años.

RE: How to get url of webcontent to screen.

Junior Member Mensajes: 59 Fecha de incorporación: 11/01/12 Mensajes recientes
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!