Question

I've developed with WPS and WCM for several years and now I am also learning Liferay. I can't help but compare the features and I understand that in Liferay some things are done differently.

I would like to know the best practices to manage the following simple example:

  • A simple page with a carrousel with several images and links
  • Google analytics inserted in the page (Reusable in most pages)

The following is how I'd solve it in IBM WPS:

  • A HTML component with the Google Analytics code that is called in every page (I can't find how to do this in Liferay)
  • A content definition of an image and a link.
  • Create several contents for each image and link.
  • Create a menu that shows the list of content in the form of a carrousel (I can't find how to do this either in Liferay)

I am aware that Liferay has a list portlet and content that has repeatable items. I know I could use these, however its much more usable if I can have on content for each image/link and one reusable HTML snippet of code.

How should I solve this in liferay in the most efficient way?

Thanks!

Was it helpful?

Solution

You have to use Liferay Web Content portlet for creating the carousel. This is available in Control Panel. For your particular requirememnt you have to create a dynamic web content, which involves using of Velocity language and javascript to iterate over a set of images. Infact if you see Liferay's website, the home page has this kind of stuff.

For Google Analytics there are two ways. Liferay is not just meant for creating one site, it caters creation of multiple sites. Each site has a group of pages. You can create site from Control panel again. In the site settings you have this option to add google analytics id. So with each site can have different google analytics id.

If you want to do it at a global level, we add the google analytics script snippet in the Theme of liferay.

To get a better understanding of all the jargons used in Liferay, you have to atleast go through Liferay's documentation. And while going through it you have unlearn what you have previously learned. Liferay has hell lot of features than Websphere portal.

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top