Wellcome!

In Cms Howto you'll find updated tutorials to work with Alfresco, Liferay, and other cms software. In a world without information, Cms Howto is the solution.
Showing posts with label liferay. Show all posts
Showing posts with label liferay. Show all posts

Sunday, February 21, 2010

Alfresco Search Portlet for Liferay

Most developers who have worked with Alfresco and Liferay have had the problem of having to integrate both applications.

 This integration has become progressively more complex, especially since both platforms are competing for some products increasingly similar, which means that they no longer be supported. Fortunately we have the APIs to program our own applications.

Alfresco Search Portlet uses the Alfresco web services api to do searches on the repository. Similarly, we may develop several portlets for exploiting other features of Alfresco api.

Below are two scren shots of the portlet in view and edit modes:


 The portlet uses a username and password to connect to alfresco and perform a search based on permissions for that user.

Finally, note that the portlet has been tested in the following environment:


Community Liferay 5.2.3 & 6.0, Alfresco 3.2 & 3.3, JDK 1.5 +.

Download Alfresco Search Portlet 

Pd: Have I been helpful? I'd be happy to receive your donations;)

Wednesday, December 2, 2009

Tuesday, November 17, 2009

Changing the LifeRay context

In LifeRay we can found different types of urls, such as /c, /d, /theme, etc. It would be useful that all urls began by the same string, for example /portal. In that case we´ll have:

/portal/c../
/portal/d../
/portal/theme../

This allows Apache to handle easily the Liferay urls. To do that:

1.- Firstly, shutdown LifeRay.

2.- Edit portal-ext.properties, and add:

portal.ctx=/portal
portlet.virtual.path=/portal

3.- Rename the /ROOT folder to /portal in TOMCAT_HOME/webapps.

4.- Rename "tomcat-6.0.18/conf/Catalina/localhost/ROOT.xml"  to "tomcat-6.0.18/conf/Catalina/localhost/portal.xml".

5.- Delete the content of the folders /temp and /work in TOMCAT_HOME (delete the tomcat cache).

6.- Restart LifeRay.

Probably we must redo the Lucene Index in LifeRay control panel. Finally we can go to the LifeRay home page at:

http://localhost/portal

Saturday, November 7, 2009

Adding portlets to a theme/layout

If we want to include some portlet in all the pages of our web, we must include it into a theme or layout file (.vm or .tpl).

For example, it would be useful to have a breadcrumb portlet in the layout and not have to manually include it on every page. Even we could establish a default configuration.

Other portlets which should be included on the theme could be the language portlet, content search, navigation, etc.

The following examples show how to add a language portlet, to do that we have two posibilities:

a) Adding the portlet to portal_normal.vm with the xml configuration:








b) Adding the portlet to a hidden page, configure it and instance his portlet-id from portal_normal.vm:

Saturday, September 19, 2009

Creating a portlet clon in LifeRay

Some times we need a copy of a existing portlet, like navigation, breadcrumb, etc. We can do a copy of some portlet to instance it in the theme and have two different portlet configurations for the same type of portlet. This are the steps that we have to follow:

1. Edit liferay-display.xml and add a free id entry for that portlet.

2. Edit liferay-portlet.xml. We can copy the "..." of the origin portlet, and asign the free id of point 2.

3. Edit portlet-custom. We do the same of point 3.

4. Finally, we give a title to the portlet. Create a file in“/portal/WEB-INF/classes/content” called Language-ext_en_US.properties and add the line:
javax.portlet.title.FreeId=My_Clon_Portlet