Tuesday, December 12, 2017

Liferay DXP - Fetch value from portlet.properties

Liferay 6 and below version:

 import com.liferay.util.portlet.PortletProps; 


Liferay DXP :

Older version approach is not working in DXP to overcome this we need to follow the below step.

Step 1:
Create class in your custom portlet as show below snippet.

 import com.liferay.portal.kernel.configuration.Configuration;
 import com.liferay.portal.kernel.configuration.ConfigurationFactoryUtil; 

 public class PortletPropsConfigurationUtil{ 
      public static String get(String key){
           return _configuration.get(key);

      public static String[] getArray(String key){
           return _configuration.getArray(key);

      private static final Configuration _configuration =  ConfigurationFactoryUtil.getConfiguration(PortletPropsConfigurationUtil.class.getClassLoader(), "portlet");

Step 2:

Friday, June 23, 2017

How to Change Liferay Default User Portrait

Step 1: add the below given properties in portal-ext.properties

Step 2: Add the default custom image under below given path


Step 3: Restart the server