Category: Liferay

Setting Custom Timezones in Liferay

By default Liferay uses UTC as timezone. In order to set custom timezones you may choose from the following options: Create an EXT-Plugin Specify timezone in Tomcat’s setenv script EXT-Plugin Create an EXT-plugin (or use your existing one) and put in extyour-extdocrootWEB-INFext-implsrc using the following setting: Be sure the deploy and restart Tomcat afterwards. […]

Setting Custom User Model Attributes in Liferay

Oftentimes you will need to extend Liferay’s built-in User model by adding custom attributes, such as a list of preferred settings. Fortunately, Liferay provides developers with an ExpandoBridge implementation to do so. Thus, in order to add custom attributes simply use the Custom Fields option via the Control Panel (or programmatically). Search for the User […]

Determining Absolute Path for FileEntry in Liferay

In case you are wondering how to determine the absolute path to FileEntry objects in Liferay (i.e. Document and Media Library elements) here is how it works. First, add the following to your Then, to calculate the absolute path for a FileEntry use the following code: Note that in order to get the foldername […]

Determine Path to Portlet Assets in Liferay JSP Files

When developing the front end (i.e. templates and JSP files) for portlets you will definitely at some want to include/reference custom assets, such as images. Luckily, in Liferay in order to determine the path to your portlet’s assets you only need to follow two steps. In your view.jsp (or any custom JSP file for that […]

Search Categories by Name or Vocabulary in Liferay 6+

When using categories (AssetCategory) for assets such as web content (i.e. JournalArticles) in Liferay one of the use cases you will most probably come across is to search for matching entries by name. Furthermore, as categories are made up of sets of vocabularies (AssetVocabulary) you might also want to search for categories matching certain vocabularies. […]

Add Email Verification to Registration Process in Liferay

By default users registering on a Liferay portals are assigned a randomly generated password and their accout is active immediately. Upon first login, users are then required to change their password. Well, to put it delicately, especially the second step in this registration process will definitely confuse some of your potential users since why do […]