O'Reilly logo

Liferay User Interface Development by Frank Yu, Xinsheng Chen, Jonas X. Yuan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configurable theme settings

There are many use cases where you would like to change some default settings in the theme so that you can modify the values after the theme is built and deployed. Fortunately, each theme can define a set of settings to make this configurable. The settings are defined as key-value pairs in the liferay-look-and-feel.xml file of the theme with the following syntax:

<settings>
<setting key="my-setting1" value="my-value1" />
<setting key="my-setting2" value="my-value2" />
</settings>

These settings can then be accessed in the theme templates using the following code:

$theme.getSetting("my-setting1")
$theme.getSetting("my-setting2")

For example, I need to create two themes—PalmTree Publications theme and AppleTree Publications ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required