構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Rujuan Xing
Theme setting checkbox doesn't work
2012/10/19 8:25
答え

Rujuan Xing

ランク: New Member

投稿: 11

参加年月日: 2012/10/05

最近の投稿

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
2012/10/30 23:51
答え

Gaurav Jain

ランク: Regular Member

投稿: 141

参加年月日: 2011/01/31

最近の投稿

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
2012/10/30 23:58
答え

Aarti Dholiya

ランク: New Member

投稿: 18

参加年月日: 2012/02/07

最近の投稿

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