|
Includes |
Top Previous Next |
|
Includes are links to another template file within a template file. For example, you could have a template file named template.html with the following contents:
This is the template with the [[include_file1.html]] include
And also you have another template file include_file1.html in the templates/ directory containing:
<b>very nice</b>
After processing the template.html file the result would appear as :
This is the template with the <b>very nice</b> include.
You may use variables, conditions and includes within an include, but you cannot use patterns.Includes are useful for having separate header/footer files and also for using the same template/HTML code in different template files.
The following is a portaion real example included as template_search.html that shows a template search. Notice how the header and foolter is included.
[[header.html]]
<TABLE width="100%"> <TR>
{$products{ <TD valign="top"> <b>Products:</b><br> <UL> $products </UL> </TD> }}
</TR> </TABLE>
[[footer.html]] |