0

条件内でjTemplatesの$P.imagesPerRowパラメータを使用することは{#if}可能ですか?

それは私にとって「Uncaught12」の例外を引き起こします。

{#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}
4

1 に答える 1

1

私はこれをテストしておらず、ただの予感ですが、次の行を変更してみてください。

{#if $T.record$index % {$P.imagesPerRow} == 0}

これに:

{#if $T.record$index % $P.imagesPerRow == 0}
于 2011-01-05T09:07:16.893 に答える