Template |
Miscellaneous | |
| Aptilis 2.4 | ||
Template Template_Name
Template allows you to access text-blocks in your script which are outside your program code (the subs).
These text-blocks may contain HTML, XML, CSV-data (e.g. Aptilis databases) or any other plain text data. You could even use base64-encoded data for email-attachments.
Important: Your template ends with the line:
end tamplate_name
or
end template
So if you have one of these lines within your template, the parser will stop here and your template will be too short. Check the GetTemplate examples to see how to avoid this problem.
Example:
#!/usr/bin/aptilis.exe
template my_template
Hi, I'm a template
end my_template
sub main(args[])
print(getTemplate("my_template")$)
end main
Result:
Hi, I'm a template |
See also GetTemplate
