2010-11-25 3 views
0

{#if} 조건에서 jTemplates의 $P.imagesPerRow 매개 변수를 사용할 수 있습니까?

"Uncaught 12"예외가 발생합니다.

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

답변

1

나는이 테스트를하지 않은, 그리고 그냥 직감이지만,이 라인을 시도하고 변경이에

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

:

{#if $T.record$index % $P.imagesPerRow == 0} 
관련 문제