主题 : if标签条件中或者怎么写 |
级别: 解元
![]() |
1# 发表于:2017-06-26 17:15:37 IP:219.211.*.*
|
||||
---|---|---|---|---|---|
级别: 解元
![]() |
3# 发表于:2017-06-26 17:22:12 IP:219.211.*.*
回复第2楼
[@cms_channel_list parentId = c.id] [#list tag_list as c1] [#if c.id != 98 || c.id != 100 || c.id != 101] <span><a href="${c1.url}">${c1.name}</a></span> [/#if] [/#list] [/@cms_channel_list] 这个if条件加上了为什么没反应?子栏目还是显示出来了 |
||
---|---|---|---|
级别: 解元
![]() |
5# 发表于:2017-06-26 17:24:35 IP:219.211.*.*
回复第4楼
我想把父栏目的ID=98 100 101 的子栏目都不显示,而其它的都显示。。。 |
||
---|---|---|---|
级别: 解元
![]() |
7# 发表于:2017-06-26 17:28:32 IP:219.211.*.*
回复第6楼
报错 FreeMarker template error: For "!" right-hand operand: Expected a boolean, but this has evaluated to a number (wrapper: f.t.SimpleNumber): ==> [in template "WEB-INF/t/cms/www/default/include/nav.html" at line 12, column 16] ---- FTL stack trace ("~" means nesting-related): - Failed at: #if (!c.id == 98) || (!c.id == 100) |... [in template "WEB-INF/t/cms/www/default/include/nav.html" at line 12, column 9] - Reached through: @cms_channel_list parentId=c.id [in template "WEB-INF/t/cms/www/default/include/nav.html" at line 10, column 7] - Reached through: @cms_channel_list [in template "WEB-INF/t/cms/www/default/include/nav.html" at line 2, column 5] - Reached through: #include "../include/nav.html" [in template "WEB-INF/t/cms/www/default/include/header.html" at line 42, column 5] - Reached through: #include "../include/header.html" [in template "WEB-INF/t/cms/www/default/index/index.html" at line 19, column 4] ---- Java stack trace (for programmers): ---- freemarker.core.NonBooleanException: [... Exception message was already printed; see it above ...] |
||
---|---|---|---|
级别: 解元
![]() |
9# 发表于:2017-06-26 17:30:36 IP:219.211.*.*
回复第8楼
还是错 freemarker.core.ParseException: Syntax error in template "WEB-INF/t/cms/www/default/include/nav.html" in line 12, column 22: Encountered "=", but was expecting one of: <STRING_LITERAL> <RAW_STRING> "false" "true" <INTEGER> <DECIMAL> "." "+" "-" "!" "[" "(" "{" <ID> |
||
---|---|---|---|