主题 : 静态化 |
级别: 解元
![]() |
13# 发表于:2017-09-29 11:39:40 IP:125.134.*.*
[@cms_content_list count='7' titLen='25' orderBy='2' channelOption='1'channelId='1991' dateFormat='MM-dd' ]
<ul class="list a-half"> [#list tag_list as a] <li> <span>${a.date?string(dateFormat)}</span><a href="${a.url}" target="_blank" title="${a.title}">[@text_cut s='${a.shortTitle!title}' len=titLen append='...'/]</a> </li> [/#list] </ul> [/@cms_content_list] 版主这是我写的标签,主页上显示错误 ![]() |
||
---|---|---|---|
级别: 版主
![]() |
14# 发表于:2017-09-29 11:40:54 IP:220.64.*.*
[@text_cut s='${a.shortTitle!title}' len=titLen append='...'/]
没有这种写法 |
||
---|---|---|---|
级别: 解元
![]() |
17# 发表于:2017-09-29 11:45:41 IP:125.134.*.*
<a href="${a.url}" target="_blank" title="${a.title}">${a.shortTitle!title}</a> 还是报上图的错误
|
||
---|---|---|---|
级别: 解元
![]() |
19# 发表于:2017-09-29 11:48:13 IP:125.134.*.*
FreeMarker template error:
The following has evaluated to null or missing: ==> a.shortTitle!title [in template "WEB-INF/t/cms/cic/default/index/index.html" at line 157, column 162] Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use [#if myOptionalVar??]when-present[#else]when-missing[/#if]. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)?? The failing instruction (FTL stack trace): ---------- ==> ${a.shortTitle!title} [in template "WEB-INF/t/cms/cic/default/index/index.html" at line 157, column 160] @cms_content_list count="7" titLen="1... [in template "WEB-INF/t/cms/cic/default/index/index.html" at line 153, column 49] |
||
---|---|---|---|
级别: 解元
![]() |
20# 发表于:2017-09-29 11:54:21 IP:125.134.*.*
好了,我用【if】 【else】 做了一下判断 ${a.shortTitle!} 这种有叹号和没有叹号有什么区别嘛?
|
||
---|---|---|---|