4/04/2011

How to create your own portal-wide properties in Liferay

If you need to set your own properties, for example to display or hide certain data, you can do the following. Add your property to the portal-ext.properties like this (your portal-ext.properties can be found in your ext in the source folder of ext/impl):


your.property.here = My special property value


Then deploy your ext, and access it wherever you want by using this:


String yourPropertyValue= PropsUtil.get("your.property.here");


That´s all :) I like it !






If you like this tutorial it would be very nice, if you could click on some of the google ads you see on the right side. It helps me run this block and motivates me ;)

If you have any questions, feel free to leave a comment.