1/06/2014

How to directly link to a liferay web content

When you want to show Web Contents to your visitors and have a meaningful URL  (one that has the article´s title in it), then you should check out LIferay´s Display Pages. It allows you to assign WebContents statically to a page and then access that page through a link that has the WebContents title. Normally WebContents are not bound to any page at all, but Display Pages allow just that. This will only work in Liferay 6.1 and above. This is how you do it :

First you'll need to create a page and assign the asset publisher portlet to it. You only have to change one part in the configuration and that is  you'll need to check the box next to the option that sets the asset publisher as the default publisher for the page. 

When you are creating your Web Content you now have the possibility to select a Display Page (see right side menu).
Select the page you just created. After the WebContent has been published, you can access the page with the WebContent´s title. Example: http://localhost:8080/-/this-is-a-webcontent .

Should make SEO much easier ...