Позволяет повторить некоторую часть шаблона определенное количество раз. Значение количества раз можно определять на этапе выполнения шаблона, если для атрибута times использовать DBE.
<core:repeat time='counter'> ...some content <core:repeat>
В любом месте WACT шаблона.
Любое
Рабочий пример см. в папке /limb/wact/examples/tags/core/repeat
Шаблон repeat.html:
<core:repeat value="5"> <p>This will be outputed 5 times</p> </core:repeat> <core:repeat value="{$times}"> <p>This will be outputed 4 times. The number of repeats is set from php-script at run time.</p> </core:repeat>
php-скрипт:
$template = new WactTemplate('repeat.html'); $template->set('times' 4); $template->display();
Обсуждение