是否可以在{#if}条件中使用jTemplates的$P.imagesPerRow参数?
它为我引发了“unautt12”异常。
{#foreach $T as record}
{#if $T.record$index % {$P.imagesPerRow} == 0}
</tr>
<tr>
{#/if}
<td class='image-preview-cell' style='width: {$P.cellWidth}; height: {$P.cellHeight}'>
<img src='{$T.record.url}' title='{$T.record.title}' alt='{$T.record.title}'/>
</td>
{#/for}发布于 2011-01-05 17:07:17
我还没有测试过这一点,这只是一种预感,但请尝试更改这一行:
{#if $T.record$index % {$P.imagesPerRow} == 0}要这样做:
{#if $T.record$index % $P.imagesPerRow == 0}https://stackoverflow.com/questions/4281181
复制相似问题