主题 : @cms_channel_list和@cms_content_list的相关问题 |
级别: 秀才
![]() |
11# 发表于:2017-05-27 17:31:38 IP:180.109.*.*
|
||||
---|---|---|---|---|---|
级别: 秀才
![]() |
14# 发表于:2017-05-31 09:17:26 IP:180.109.*.*
谢谢,这正是我需要的
|
||
---|---|---|---|
级别: 秀才
![]() |
16# 发表于:2017-05-31 10:08:00 IP:180.109.*.*
[@cms_channel_list parentId=channel.id]
[#list tag_list as c] <li class="level1"> <a class="nav-g current" href="${c.url}">${c.name}</a></li> <ul class="level2 cur"> [@cms_content_list channelId=c.id] [#list tag_list as c1] [#if c.id==c1.channel_id] <li><a href="${c1.url}">${c1.title}</a>${c.id}</li> [/#if] [/#list] [/@cms_content_list ] </ul> [/#list] [/@cms_channel_list] [@cms_content_list channelId=c.id] 这个后台报错 The following has evaluated to null or missing: Servlet.service() for servlet [JeeCmsFront] in context with path [/jeecms] threw exception [Request processing failed; nested exception is freemarker.core.InvalidReferenceException: The following has evaluated to null or missing: ==> c1.channel_id [in template "WEB-INF/t/cms/www/default/channel/product_menu.html" at line 26, column 70] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- 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: #if c.id == c1.channel_id [in template "WEB-INF/t/cms/www/default/channel/product_menu.html" at line 26, column 59] - Reached through: @cms_content_list channelId=c.id [in template "WEB-INF/t/cms/www/default/channel/product_menu.html" at line 24, column 54] - Reached through: @cms_channel_list parentId=channel.id [in template "WEB-INF/t/cms/www/default/channel/product_menu.html" at line 20, column 30] ----] with root cause FreeMarker template error: The following has evaluated to null or missing: ==> c1.channel_id [in template "WEB-INF/t/cms/www/default/channel/product_menu.html" at line 26, column 70] |
||
---|---|---|---|
级别: 秀才
![]() |
19# 发表于:2017-05-31 10:12:06 IP:180.109.*.*
![]() |
||
---|---|---|---|