【问题标题】:Liquid error: Unable to cast object of type 'System.Int32' to type 'System.String'Liquid 错误:无法将“System.Int32”类型的对象转换为“System.String”类型
【发布时间】:2016-08-01 10:41:01
【问题描述】:

我在 Liquid Web 模板中的 AdxStudio 期间遇到此错误。

液体错误:无法将“System.Int32”类型的对象转换为“System.String”类型。

我的代码如下:

<div>Posts count: {{website.forums[1].threads[0].posts.post_count}}</div>

谢谢。

【问题讨论】:

    标签: adxstudio-portals


    【解决方案1】:

    请试试这个:

    统计特定论坛帖子:

    <div>Posts count: {{website.forums[1].post_count}}</div>
    

    统计特定论坛的特定线程数:

    <div>Posts count: {{website.forums[1].threads.all[0].post_count}}</div>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-02-03
      • 2019-12-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-04
      • 2021-10-25
      • 1970-01-01
      相关资源
      最近更新 更多