Glasnost

help

 

TAL Statements: repeat variable

An iteration object variable is automatically set in a repeat statement. Its name is repeat_ followed by the name of the variable used.

This variable contains the following attributes:

and two methods, intented for use with sorted lists:

Example

<ul>
  <li tal:repeat="author currentObject.authorsSet">
     <span tal:replace="repeat_author.roman">i</span>.
     <span tal:replace="author.name">Name</span>
  </li>
</ul>

results in something like this:

<ul>
  <li>i. Emmanuel</li>
  <li>ii. Frederic</li>
  <li>iii. Odile</li>
  <li>iv. Benjamin</li>
</ul>
up