Manage Pages - ThemeWebSettings: new theme's settings controlled by a new tab inside look-and-feel web interface.
Description
Attachments
1
Activity
Show:

Liferay WCMAugust 31, 2011 at 1:13 AM
Contribution accepted in
Fixed
Details
Assignee
SE SupportSE SupportReporter
José Ignacio HuertasJosé Ignacio HuertasComponents
Fix versions
Affects versions
Priority
Medium
Details
Details
Assignee

Reporter
Components
Fix versions
Affects versions
Priority
Zendesk Support
Linked Tickets
Zendesk Support
Linked Tickets
Zendesk Support

Linked Tickets
Created September 2, 2010 at 5:17 PM
Updated June 26, 2023 at 5:55 AM
Resolved August 31, 2011 at 1:13 AM
This new feature allow theme's developers to define settings whose values could be controlled by a new tab inside look-and-feel web interface. It's easy to use. The setting's values will be storen on BD, in the tables: layout or layoutset. It depends of the look-and-feel selected (page or communities). You can assign values to the settings in the Manage Pages / look-and-feel, so you don't have to re-deploy the theme with every change. It will create the velocity variables automatically. It's easy to use:
To define the ThemeWebSetting you must define it inside the liferay-look-and-feel theme's file:
<theme id="id-el-tema" name="nombre-el-tema">
<web-settings>
<setting key="websetting1" value="">
<setting key="webSetting2" value="option1;option2;option3">
...
</web-settings>
</theme>
In the first case, we can assign any value to the setting "websetting1" (it will create a textarea on the web interface): text, html code, etc. In the second ("websetting2"), only "option1", "option2" or "option3" (it will create a combo-list on the web interface).
To use it on the templates: $websetting1 or $websetting2. For example:
if ($websetting2== "option1") {
....