KLOOP (for templates)

Type

Tag

Explanation

Loops around a section of HTML, once for each record in a recordset. The loop can be split into sections. This might be done to vary how records are displayed. For example, to have different table row colours for every other record.

Format 1

<KLOOP__recordset>...</KLOOP__recordset>

Format 2

<KLOOP__recordset totalsections>
   <KLOOP__recordset sectionnum>
   ...
   </KLOOP__recordset sectionnum>
</KLOOP__recordset>

Note: totalsections="1" is not valid.

Example (format 2)

<KLOOP__SuppliersRecordset totalsections="2">
   <KLOOP__SuppliersRecordset sectionnum="0">
      <!-- colour 1 -->
      <td bgcolor="#ff0000">
         KVALUE__SuppliersRecordset.supplierdescription.=""
      </TD>
   </KLOOP__SuppliersRecordset sectionnum="0">
   <KLOOP__SuppliersRecordset sectionnum="1">
      <!-- colour 2 -->
      <td bgcolor="#0000ff">
         KVALUE__SuppliersRecordset.supplierdescription.=""
      </TD>
   </KLOOP__SuppliersRecordset sectionnum="1">
</KLOOP__SuppliersRecordset>