主题 : 在新闻列表页不能获取当前栏目的子栏目吗?
级别: 解元
UID: 112523
积分:292 加为好友
威望: 55 精华: 0
主题:57 回复:151
注册时间:2017-04-16
在线时长:0
1#   发表于:2017-06-30 10:29:26  IP:219.211.*.*
在一级栏目获取该栏目的所有子栏目,标签报错

The following has evaluated to null or missing:
==> nd  [in template "WEB-INF/t/cms/www/default/channel/news.html" at line 38, column 220]

----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like 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 parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
- Failed at: ${c1.name}  [in template "WEB-INF/t/cms/www/default/channel/news.html" at line 38, column 218]
- Reached through: @cms_channel_list parentId=channel.id  [in template "WEB-INF/t/cms/www/default/channel/news.html" at line 34, column 6]
----

Java stack trace (for programmers):
----
freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
at freemarker.core.UnexpectedTypeException.newDesciptionBuilder(UnexpectedTypeException.java:80)
at freemarker.core.UnexpectedTypeException.<init>(UnexpectedTypeException.java:43)
at freemarker.core.NonHashException.<init>(NonHashException.java:49)
at freemarker.core.Dot._eval(Dot.java:48)
at freemarker.core.Expression.eval(Expression.java:81)
at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:96)
at freemarker.core.DollarVariable.accept(DollarVariable.java:59)
at freemarker.core.Environment.visit(Environment.java:326)
at freemarker.core.Environment.visit(Environment.java:368)
at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:263)
at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:200)
at freemarker.core.Environment.visitIteratorBlock(Environment.java:595)
at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:81)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:67)
at freemarker.core.Environment.visit(Environment.java:362)
at freemarker.core.Environment$NestedElementTemplateDirectiveBody.render(Environment.java:2727)
at com.jeecms.cms.action.directive.ChannelListDirective.execute(ChannelListDirective.java:77)
at freemarker.core.Environment.visit(Environment.java:426)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:101)
at freemarker.core.Environment.visit(Environment.java:326)
at freemarker.core.Environment.visit(Environment.java:332)
at freemarker.core.Environment.process(Environment.java:305)
at freemarker.template.Template.process(Template.java:384)
围观各种技术大屌。。。。
级别: 版主
UID: 70293
积分:78391 加为好友
威望: 1 精华: 0
主题:7 回复:68397
注册时间:2014-12-03
在线时长:0
2#   发表于:2017-06-30 10:30:35  IP:182.217.*.*
 ${c1.name} 改成${c.name}
1
级别: 解元
UID: 112523
积分:292 加为好友
威望: 55 精华: 0
主题:57 回复:151
注册时间:2017-04-16
在线时长:0
3#   发表于:2017-06-30 10:31:58  IP:219.211.*.*
回复第2楼
额,好尴尬。。。
围观各种技术大屌。。。。
级别: 版主
UID: 70293
积分:78391 加为好友
威望: 1 精华: 0
主题:7 回复:68397
注册时间:2014-12-03
在线时长:0
4#   发表于:2017-06-30 10:32:13  IP:182.217.*.*
1
级别: 解元
UID: 112523
积分:292 加为好友
威望: 55 精华: 0
主题:57 回复:151
注册时间:2017-04-16
在线时长:0
5#   发表于:2017-06-30 10:51:55  IP:219.211.*.*
回复第4楼
子频道的新闻列表页是news_child.html?
围观各种技术大屌。。。。
级别: 版主
UID: 70293
积分:78391 加为好友
威望: 1 精华: 0
主题:7 回复:68397
注册时间:2014-12-03
在线时长:0
6#   发表于:2017-06-30 10:52:36  IP:182.217.*.*
这个可以自己定义,不一定非得是这个
1
1 共1页