Which is the Liferay equivalent of a IBM WebSphere Portal / WCM Menu? - liferay

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!

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

Related

Integrating html templates in Kentico 10

I am using Kentico portal to make an E-commerce site.If I wish to change the design of available sample E-commerce site.Would it be a tidious task ?
Example : If I download e-commerce design templates (i.e html and css files) and I wish to change design of each page of sample kentico site (home page,product detail page etc.)then, what is the most suitable and quick way to achieve this ?
How should I update the html/css of each page of available site with downloaded templates? OR Should I create entirely a new e-commerce site in the portal ?
The out of the box sites are meant to be used as examples and references not to build a production site off of. The markup used on the Ecommerce site will also be different, considerably different than your purchased template. I've found it much easier and faster to start from scratch with a blank site and implement all of the design that way. Make sure you take advantage of shared layouts and templates, this will help make development and re-skins in the future easier.

Liferay: How can I get the pages of the site in a web content?

I have a portal in Liferay 6.2, and need to design the velocity template of a web content that must have a menu listing the pages (linked names) of the site where is present.
My questions are:
Is this possible?
What would be the correct way to do this?
Would it be better to make a portlet instead of a web content for this purpose?
Thanks for the help.
It feels a bit like you are trying to solve many problems in a single template - consider to compose the UI from many different elements (e.g. custom portlets) rather than building the one structure/template that fits all requirements.
That being said, as there's also the chance that your template doesn't do more than just displaying the current navigation: You have two options: The out-of-the-box Navigation portlet is quite configurable, you might be able to utilize that one instead of implementing anything yourself (check the configuration options).
And lastly, if you want to implement for yourself: Get hold of the themeDisplay object. With getLayout() you'll get the current page, while getLayouts() you'll get all pages of the current site and can enumerate them. However, there's one problem: You typically don't have access to the themeDisplay object from a CMS template. But there are several ways to still get to the data (search the Liferay forums for cms template themedisplay). Also, an Application Display Template will be a lot more powerful - and you can also check how the layouts collection is built - just search for usage of ThemeDisplay.setLayouts in Liferay's source code. But with ADT we're diverting from your original question.
Liferay offers a sitemap portlet out-of-the-box which lists pages of a site. You can configure it and define your own application display template (ADT).

Liferay create site / page programmatically

I have been using Liferay for work for 2 weeks. I noticed that it's a bit difficult to find good documentation and tutorials.
Until now I created pages from the web portal. After I create them, I drag and drop portlets. I don't really like this approach, I would prefer to use a coding approach. Is there a way to create a website or page programmatically by defining a project as I do to create portlets?
Moreover, I am using Liferay with WebLogic 10.3.6. I want to know where liferay puts pages I created via web-portal on the file system. I suppose that a file, or something similar, is created when I declare a new site on the Liferay web-portal.
Thank you all,
Marco
Yes Liferay has it's Database, all data of any Liferay object is stored in the database and / or on the file system depending on your configuration.
However, one of the functionality of Liferay is to let you create pages / sites through the UI. As documented in the Java Portal Specification and Liferay Server Documents your approach to create pages in an alternative way is possible but it is part of Liferay's Portal Services. You can use Liferay's Service (HTTP REST) API to call the related service. To access those APIs you need to configure your Liferay Server.
In case you want to do programmatically you still need to configure, enable and call those external HTTP services from your code. You should not create Liferay Objects from your own code hosted as an extension inside your Liferay Instance as that will result inconsistency in your Liferay Database / filesystem. (As in case of page creation Liferay creates a set of other related objects in it's database / filesystem.)
In your liferay bundle you will find two plugins of interest.
First is resources-importer-web for which description says
The Resources Importer app allows front-end developers to package web
content, portlet configurations, and layouts together in a theme
without saving it as a compiled .LAR file thereby allowing for greater
flexibility in its usage between Liferay Portal versions.This app will automatically create associated content when other
plugins are deployed that are configured to make use of the Resource
Importer app.This app installs as a Liferay service.
Second is welcome-theme which declares resources to be created by resources-importer-web. This on should be example how to create your own. Take a look at
welcome-theme\WEB-INF\src\resources-importer\*
welcome-theme\WEB-INF\liferay-plugin-package.properties
This feature is described at importing-resources-with-themes
As mentioned by gabor_the_kid, Liferay stores all objects in its tables. For example, User related objects would be in user table. Liferay exposed services or API's to change the default/to add new behaviors by program but not easier than achieving it through UI. Also maintenance should be considered for going program way of creating pages or layouts etc.
You can describe your changes using xml and use the Liferay Portal DB Setup core to create the changes in DB.
The library defines the list of available xml configurations.

Which to choose and when: Web content, Dynamic List Records or Specific Model?

I find that Liferay concepts are quite confusing.
When I add new items, I don't know what is the best to choose:
Use the web content concept with template and structure
Use the dynamic list records
Use a specific model (using service builder).
All of these are really similars and can achieve same goals.
Have you got any clue or advice on what concept to choose when you develop some new features in Liferay?
You should use the components in this way :
Web Content : Web contents provide convenient way to create, update, view, modify, create RSS feeds, customize the content of the web site. It is one of the main component of the Liferay CMS. You should use web content when,
You have static content and want to show to the site.
You have specific structure of the content (like content with an inline image and a document link), then please use web content with the structure and template
You want to use ready to use content portlets ( web content list, web content display, web content search) instead of creating new set of portlets for your own type.
After all this, Liferay provides customization of web contents by allowing user to add new content type, creating rss feeds, structures, templates, ready workflow, content type roles etc.
Dynamic List : Consider dynamic list as a database with display functionality. Here, you can create a custom type of data and provide display functionality. If you have any requirement like user can create his/her own type of list maintain them, then go for it.
Custom Portlet : If your requirement is very case/scenario specific that you cannot achieve using list or web content or any other Liferay portlets (blogs, wiki, knowledge based articles etc) then go for custom portlet, here please remember, that at every liferay upgrade, you need to review the portlet and update the code accordingly in case of any API change or something. For OOB portlets, Liferay takes care of it.
Hope this helps!
It deends on what you want to have and how much control you want to have over your code.
To make simplistic application use web content concept with template
and structure.(need not to know technologies)
-To make some complex applications use dynamic list records
To make extremely complex applications and have full control over the flow use liferay service builder.(need t be a expert java programmer)
Hope that helps :)

Creating Dynamic Sitemap in SharePoint

I have developed a publishing portal in sharepoint.I have a requirement wherein I need to create sitemap for the entire web application.
This should be dynamic, in the sense, whenever we update the contents of any given page in our web application, it should be reflected immediately in the sitemap page. What are the possible ways to achieve this and which is the best possible solution considering the scalability and easy configuration?
Thank you.
If you don't want to use a custom webpart, you could use normal navigation list to create your sitemap and it is automatically updated. You only need to style it in a way to resemble some kind of sitemap.
Here are some links to get you started with customizing your navigation:
Custom Navigation in SharePoint - The Full Monty
How to: Customize Navigation
Also there is the portal site map which provides the data source for your custom menu. Just read up on custom navigation and stuff like PublishingNavigation:PortalSiteMapDataSource and SharePoint:AspMenu.
There is a nice PowerShell script to create a sitemap for SHarepoint 2010, if you want to submit your sitemap to Google: Generate A Sitemap For SharePoint 2010 Using PowerShell'.
You can also install and customize the SharePoint Web part ("Table of Contents") to your liking. Read up on it here...
Take a look at our ECS product, it is close to what you need
http://www.infowisesolutions.com/product.aspx?id=ECS
It was built as a system of cross site collection navigation, with security trimming and permissions inheritance between site collection.

Resources