Tagged: liferay

Liferay Logo 2

Setting Custom Portlet Titles in Liferay

Setting custom portlet titles in Liferay can be a little tricky. Changing the title via the portlet configuration in the frontend is easy but when it comes to reading the custom title property programmatically things seem to get a little messy. Setting the Title So, first of set your portlet...

Liferay Logo 0

Determine Portlet URL in Liferay

Since Liferay has a helper class for almost everything but finding the correct one sometimes costs more time than expected here is how you determine a portlet’s current URL: Hopefully this saves you some time 🙂

Liferay Logo 1

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 system-ext.properties in extyour-extdocrootWEB-INFext-implsrc using the following setting: Be sure the...

Liferay Logo 1

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...

Liferay Logo 0

Dynamically determine Structure IDs in Liferay

When using multiple Web Content (aka JournalArticle) structures in Liferay managing their corresponding IDs via configuration files can become a tedious task. Luckily, there is an easy way to determine structure IDs dynamically based on their title, like the following code snippet demonstrates:

Liferay Logo 0

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...

Liferay Logo 5

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...

Liferay Logo 7

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...

Liferay Logo 2

Image Scaling in Liferay

Have you ever wondered if Liferay offer image scaling out of the box? Yes it does, you only need to enable this option! In portal-ext.properties add: The second property image.hook.impl sets the hook implementation to be used to trigger automatic data migration during an upgrade. Requesting Scaled Images Now in...