Client Side Template
{*header}{/*header}
Description
Adds a header to a template.
Headers can be added if the data object you pass into the template expander contains array data. Using the special {*header}...{/*header} directives, you can add a header as part of the template. For example, assume we have the following array of JSON data:
{
employees: [
{firstname: 'Fred', lastname: 'Smith'},
{firstname: 'Laura', lastname: 'Linneker'}
]
}This data is an array of two employees. We would like to add the text "This is the header - it prints before the first item in the array" This can be done using the {*header} directive. The template to add the header and footer looks like this:
{employees}
{*header}
This is the header - it prints before the first item in the array<br>
{/*header}<br>
Employee name:{firstname} {lastname}
{/employees}Result:
This is the header - it prints before the first item in the array Employee name:Fred Smith Employee name:Laura Linneker