Friday, April 25, 2014

How to define Category for custom portlet in Liferay

When we deploying portlets into Liferay portal, somehow we need to define new Category Name for our customized portlets instead of just place all the portlet under Sample.
Below are the steps how to define new Category in Liferay portal.

1. Open liferay-display.xml
<?xml version="1.0"?>
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.1.0//EN" "http://www.liferay.com/dtd/liferay-display_6_1_0.dtd">

<display>
 <category name="category.sample">
  <portlet id="primefaces" />
 </category>
</display>

2. change the category name
<?xml version="1.0"?>
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.1.0//EN" "http://www.liferay.com/dtd/liferay-display_6_1_0.dtd">

<display>
 <category name="My Category Name">
  <portlet id="primefaces" />
 </category>
</display>

3. Redeploy the portlet.


Done!!

LinkWithin

Related Posts Plugin for WordPress, Blogger...