留言板
How to get webcontent url ?
Hello everyone,
Is there anyway to get url of a particular webcontent in liferay 6.2
my need is to share webcontent in facebook and whatsapp.
For that, in one of the parameter for sharing, webcontent's url is to be passed.
i have referred few sites to get url programatically, which stated to use
themeDisplay.getPortalURL() + themeDisplay.getPathMain() with groupId, folderId and articleId
i got url like
http://localhost:8080/c/journal/view_article_content?groupId=20181&folderId=30901&articleId=35193&version=1.2
but this url displays blank page
In other method i added Content Display Page portlet in Display page and then put the required particular web content in that Content Display portlet. But this also does not solve my problem, as in this, url generated is, url of whole display page.
As per my need url, i only need web content url. How to do this.
Thanks and Regards,
Amit.
Is there anyway to get url of a particular webcontent in liferay 6.2
my need is to share webcontent in facebook and whatsapp.
For that, in one of the parameter for sharing, webcontent's url is to be passed.
i have referred few sites to get url programatically, which stated to use
themeDisplay.getPortalURL() + themeDisplay.getPathMain() with groupId, folderId and articleId
i got url like
http://localhost:8080/c/journal/view_article_content?groupId=20181&folderId=30901&articleId=35193&version=1.2
but this url displays blank page
In other method i added Content Display Page portlet in Display page and then put the required particular web content in that Content Display portlet. But this also does not solve my problem, as in this, url generated is, url of whole display page.
As per my need url, i only need web content url. How to do this.
Thanks and Regards,
Amit.
Hi Amit,
Here's a piece of code I use in an AssetPublisher ADT to display the WebContent URL:
HTH
Fernando
Here's a piece of code I use in an AssetPublisher ADT to display the WebContent URL:
#foreach ($entry in $entries)
#set($renderer = $entry.getAssetRenderer() )
#set( $ProjectUrlTitle = $renderer.getUrlTitle() )
<a href="/-/$ProjectUrlTitle">
...
#end</a>
HTH
Fernando