我有以下内容:
{{for Basket.Items itemVar="~product"}}
{{for ~product.Qty}}
......
{{/for}}
{{/for}}
其中〜product.Qty =2。它仅循环一次。如何使内部for循环的数量等于Qty?]
因此,我可能有3个购物篮项目,而其中的1个项目我可能有2个数量,因此我希望模板将2个数量为2的项目显示两次
我有以下内容:{{for Basket.Items itemVar =“〜product”}} {{for〜product.Qty}} ...... {{/ for}} {{/ for}}其中〜 product.Qty =2。它只循环一次。我如何...
对于interate over a range of numbers,您不需要像在~product.Qty
中那样将{{for}}
作为{{for ~product.Qty}}
的参数,而应将其命名为end
属性:{{for end=~product.Qty}}
。