Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Rujuan Xing
Theme setting checkbox doesn't work
October 19, 2012 8:25 AM
Answer

Rujuan Xing

Rank: New Member

Posts: 11

Join Date: October 5, 2012

Recent Posts

in my liferay-look-and-feel.xml, I add settings like this:
<?xml version="1.0"?>
<!DOCTYPE look-and-feel PUBLIC
"-//Liferay//DTD Look and Feel 6.1.0//EN"
"http://www.liferay.com/dtd/liferay-look-and-feel_6_1_0.dtd">
<look-and-feel>
<compatibility>
<version>6.1.0+</version>
</compatibility>
<theme id="Sample" name="Sample">
<settings>
<setting configurable="true" key="show-breadcrumb" type="checkbox" value="false" />
</settings>
...

Whatever I check the checkbox or not, it just show me the value of "false", it doesn't show "true" when I check the checkbox. I don't know the reason, could someone give me a solution?

Thank you very much in advance!
Gaurav Jain
RE: Theme setting checkbox doesn't work
October 30, 2012 11:51 PM
Answer

Gaurav Jain

Rank: Regular Member

Posts: 146

Join Date: January 31, 2011

Recent Posts

How you are getting the value of this setting?

However you can use fllowing in your theme velocity:
$theme_display.getThemeSetting('setting-key)
Aarti Dholiya
RE: Theme setting checkbox doesn't work
October 30, 2012 11:58 PM
Answer

Aarti Dholiya

Rank: New Member

Posts: 22

Join Date: February 7, 2012

Recent Posts

It is working for me.

Use below code in your portal_normal.vm file.

#set ($show_breadcrumb = $theme_display.getThemeSetting('show-breadcrumb'))
#if ($show_breadcrumb == 'true')
<nav class="site-breadcrumbs" id="breadcrumbs">
<h1>
<span>#language("breadcrumbs")</span>
</h1>
#breadcrumbs()
</nav>
#end

Refere : http://www.liferay.com/web/raymond.auge/blog/-/blogs/theme-settings-and-new-advanced-controls