发 帖

Mstore下载排行

赞助者

分享者

分页 标签使用报500 

楼主: 囧也是壹種時尚 2019-07-18 17:31:17 95 4

18-Jul-2019 17:24:54.029 严重 [http-nio-8080-exec-19] freemarker.log._JULLoggerFactory$JULLogger.error Error executing FreeMarker template

 FreeMarker template error:

The following has evaluated to null or missing:

==> pageTag  [in template "template" at line 2, column 16]


----

Tip: If the failing expression is known to 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 !(pageTag.indexUrl??)  [in template "template" at line 2, column 9]

----


Java stack trace (for programmers):

----

QQ截图20190718172638.jpg


全部回帖

4条回复
该帖子暂无评论!
  • 1F

      pageTag拿不到值?微信图片_20190702161906.png


    select

    <#if !(pageTag.indexUrl??)>

    <#--判断是否有栏目对象,用于搜索不传栏目-->

    <#if column??>

    <#--顶级栏目处理-->

    <#if column.categoryCategoryId==0>

    <#assign path=column.columnPath/>

    <#else>

    <#assign path=column.columnPath/>

    </#if>

    <#else>

    <#assign path=""/>

    </#if>

      <#--总记录数、总页数-->

    (SELECT ${pageTag.total}) as total,

    <#--记录总数-->

    (SELECT ${pageTag.size}) as rcount,

    <#--当前页码-->

    (SELECT ${pageTag.pageNo}) as cur,

    <#--首页-->

      CONCAT("${path}", "/index.html") as `index`,

    <#--上一页-->

    <#if (pageTag.pageNo?eval-1) gt 1>

    CONCAT("${path}","/list-${pageTag.pageNo?eval-1}.html") as pre,

    <#else>

    CONCAT("${path}","/index.html") as pre,

    </#if>

    <#--下一页-->

    <#if pageTag.total==1>

    CONCAT("${path}", "/index.html") as `next`,

    CONCAT("${path}", "/index.html") as `last`

    <#else>

    <#if pageTag.pageNo?eval gte pageTag.total>

    CONCAT("${path}","/list-${pageTag.total}.html") as next,

    <#else>

    CONCAT("${path}","/list-${pageTag.pageNo?eval+1}.html") as next,

    </#if>

    <#--最后一页-->

    CONCAT("${path}","/list-${pageTag.total}.html") as last

    </#if>

    <#else><#--判断是否是搜索页面-->

     "${pageTag.indexUrl}" as `index`,"${pageTag.lastUrl}" as `last`,"${pageTag.preUrl}" as `pre`,"${pageTag.nextUrl}" as `next`,'${pageTag.total}' as total,'${pageTag.size}' as rcount,'${pageTag.pageNo}' as cur

    </#if>


    2019年07月18日 17:33 | 回复

  • 2F

    有什么注意事项?文档给的标签,贴近列表页就报500,

    2019年07月18日 17:34 | 回复

  • 3F

    4.7.0版本  分页标签可以正常使用

    • 囧也是壹種時尚说:
      我用的就是4.7.0 可是还是不好使

    2019年07月23日 17:09 | 回复