Home > Templates > Templates - Function Tags

Templates - Function Tags

Function Tags differ from standard tags as they are used to manipulate the display of data rather then pull data from the system to print on forms.

if & end

the %if% statement can be used to check if a value exists for a tag. One example use for this is to avoid printing blank header fields. The %end% tag is used to close the if statement.
<%if customerphone%>
  <br>Tel: <%customerphone%>
<%end customerphone%>


The %foreach% tag is used to print tables where the number of output rows can vary.
<%foreach payment%>
<%end payment%>


The %runningnumber% tag is used generagly with the %foreach% tag to number rows
<%foreach number%>
   <tr valign=top>
      <td align=right><%runningnumber%>.</td>
      <td align=right><%qty%></td>
      <td align=right><%sellprice%></td>
      <td align=right><%discountrate%></td>
      <td align=right><%linetotal%></td>
<%end number%>