是否有任何选项可以在标签中使用变量,例如,
{% for product in category.products | limit: {{section.limit}} %}我试过使用捕获或分配对我没用。提前谢谢..。
发布于 2018-03-27 09:35:52
只有{% for product in category.products | limit: section.limit %}
评论后的编辑:
我把字符串投给Integer的唯一方法是:
{% assign limit = section.limit | plus: 0 %}
然后是{% for product in category.products | limit: limit %}。
和Integer to String:{% assign str = 1 | append: "" %} => str == "1"
https://stackoverflow.com/questions/49508668
复制相似问题