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%>

foreach

The %foreach% tag is used to print tables where the number of output rows can vary.
<%foreach payment%>
   <tr>
      <td><%paymentdate%></td>
      <td><%paymentaccount%></td>
      <td><%paymentsource%></td>
      <td><%payment%></td>
   </tr>
<%end payment%>


runningnumber

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