Tuesday, October 19, 2010

How to set user authenticate in liferay?



There are three types of user authentication in Liferay.
By Email
By Screen Name
By User ID

By default, user authentication setting is 'By Email Address'.

To change this setting, login as portal Admin.
Click Control Panel. And choose Setting >> Authentication >> General.

Then choose the answer either 'By Screen Name' or 'By User ID'.

Next, click 'Save'.

Monday, September 6, 2010

My content too long, how to break page?

My content is too long. Then I need to break them into more than a page.

So just add @page_break@ to do it.


The result shown below.

Wednesday, August 11, 2010

Set dwilanguage for portlet title

In this example, I use Bahasa (Malay language) and English.

To set value for each language, we can customize the value in Look and Feel part.
Step 1: Click icon Look and Feel in the portlet header.


Step 2: Click tab Portlet Configuration, check box Use Cutom Title. Then define portlet title to appropriate language.


Step 3: Save.

Then results shown below.
a) Bahasa (Malay language)


b) English.

Thursday, June 10, 2010

How to embed portlet in theme? Part 1

Liferay version: 5.2.3

Embedding portlet in theme means we want to put coding in velocity files. For example, I need to embed last update portlet in a velocity file named as footer.vm.

There are three steps.
1.Install portlet using Plugin Installer. Go to Control Panel > Plugin Installer > Install more portlet > Upload file. The .WAR file for last update can be downloaded here.
2.Set the instanceable properties to false. Path: ~/server/tomcat-6.0.18/webapps/last_update-portlet/WEB-INF/liferay-portlet.xml

3.Get the portlet ID. Then put this code, $theme.runtime(“portlet_ID”)


For this example, $theme.runtime("lastupdate_WAR_last_updateportlet")
Result:



Click image to enlarge. The last update status appear in the last line.