6/01/2011

Beginners Guide to Liferay Web Contents - Part 2

I´ve created a post some days ago where I wrote about creating a Web Content. If you don´t know what a Web Content is, then please read this post first:


Today I am going to tell you how you can display multiple Web Contents in different kinds of ways without programming.

Liferay offers a lot of powerful features that will help you display your content on your portal page. The Portlet used the most is the "Asset Publisher". The Asset Publisher does exactly what its name implies: it publishes all kinds of assets. That may be Web Contents, Documents, Blog Posts etc etc. Today we will just care about displaying Web Contents - those Web Contents that we created in the last post. To add an Asset Publisher to your page, click on "Add" - "Asset Publisher":




This will place an unconfigured Asset Publisher on your portal page. Don´t get confused - in the beginning, the Asset Publisher will display ALL assets, it finds. So it may look a little crowded on your page.

As soon as you added the Asset Publisher, enter its configuration menu. You will notice that there is a lot you can change and tweek. I won´t explain all of the configuration items here, instead I am leading you directly to a configured results page. 
First click on "Asset Type" and select "Filter". This control lets you select the asset types, your asset publisher displays. Move all asset types to the right ("available"), except for "Web Content".


This will configure the Asset Publisher to only display Web Contents. The next thing we will configure is HOW the asset publisher displays its assets. Scroll down to the Display Style selection and select "Title List". This will select a different displaying JSP that will only show a title list. 
A quick note: You can create your own display styles by following this little tutorial:


The last thing we will do, is to select the metadata to display. Scroll to "Show Metadata" and select "Author" and "Publish Date":


This is all for now. Click on "Save", close the asset publisher configuration and you should see something like this:


As you can see, the Web Content we created the last time is displayed with its name, the Author and the Publish Date. If we had created more than one Web Content we would see all of them here. The Asset Publisher is a very powerful and flexible instrument to display content. In all projects I have participated until now, the asset publisher was one of the key instruments to fullfil the customers requirements. It is also very effective in actually convincing the customer to use Liferay. Just use these two tutorials and show them how easy it is to set up a flexible, working CMS.



If you like this tutorial it would be very nice, if you could click on some of the google ads you see on the right side. It helps me run this block and motivates me ;)

If you have any questions, feel free to leave a comment.