Liquid嵌套if语句

时间:2015-08-26 23:45:49

标签: if-statement nested liquid

如果该值高于零,此声明应仅返回得分,但无论如何都会返回:

{% for member in site.data.members %}
<div class="player">
    {% if member.goals > 0 %}
        <span class="goals">{{ member.goals }}</span/>
    {% endif %}
</div>
{% endfor %}

我哪里出错?

修改

谢谢Shadowen,这是我的site.data.members文件,它只是一个CSV:

name,position,goals,photo
Joe Bloggs,goalkeeper,0
James Denver,midfielder,2
Edward Martins,forward,0
Tom Kirk,defender/midfielder,0
Carl Swanson,striker,0
Orry Michaels,defender,0
Chris Smith,midfielder,0

0 个答案:

没有答案