主题 : 静态化
级别: 解元
UID: 116384
积分:242 加为好友
威望: 48 精华: 0
主题:48 回复:297
注册时间:2017-09-07
在线时长:0
11#   发表于:2017-09-29 10:56:05  IP:125.134.*.*
好的,谢啦
级别: 版主
UID: 70293
积分:78391 加为好友
威望: 1 精华: 0
主题:7 回复:68397
注册时间:2014-12-03
在线时长:0
12#   发表于:2017-09-29 10:56:49  IP:220.64.*.*
1
级别: 解元
UID: 116384
积分:242 加为好友
威望: 48 精华: 0
主题:48 回复:297
注册时间:2017-09-07
在线时长:0
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] 

版主这是我写的标签,主页上显示错误
级别: 版主
UID: 70293
积分:78391 加为好友
威望: 1 精华: 0
主题:7 回复:68397
注册时间:2014-12-03
在线时长:0
14#   发表于:2017-09-29 11:40:54  IP:220.64.*.*
[@text_cut s='${a.shortTitle!title}' len=titLen append='...'/]
没有这种写法
1
级别: 解元
UID: 116384
积分:242 加为好友
威望: 48 精华: 0
主题:48 回复:297
注册时间:2017-09-07
在线时长:0
15#   发表于:2017-09-29 11:41:26  IP:125.134.*.*
能指教一下嘛
级别: 版主
UID: 70293
积分:78391 加为好友
威望: 1 精华: 0
主题:7 回复:68397
注册时间:2014-12-03
在线时长:0
16#   发表于:2017-09-29 11:43:14  IP:220.64.*.*
不能写在截取标签里,只能写我发的
1
级别: 解元
UID: 116384
积分:242 加为好友
威望: 48 精华: 0
主题:48 回复:297
注册时间:2017-09-07
在线时长:0
17#   发表于:2017-09-29 11:45:41  IP:125.134.*.*
<a href="${a.url}" target="_blank" title="${a.title}">${a.shortTitle!title}</a>  还是报上图的错误
级别: 版主
UID: 70293
积分:78391 加为好友
威望: 1 精华: 0
主题:7 回复:68397
注册时间:2014-12-03
在线时长:0
18#   发表于:2017-09-29 11:47:16  IP:220.64.*.*
发下完整的报错
1
级别: 解元
UID: 116384
积分:242 加为好友
威望: 48 精华: 0
主题:48 回复:297
注册时间:2017-09-07
在线时长:0
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]
级别: 解元
UID: 116384
积分:242 加为好友
威望: 48 精华: 0
主题:48 回复:297
注册时间:2017-09-07
在线时长:0
20#   发表于:2017-09-29 11:54:21  IP:125.134.*.*
好了,我用【if】 【else】  做了一下判断      ${a.shortTitle!}    这种有叹号和没有叹号有什么区别嘛?
|< < 1 2 3 > >| 共3页