This examples uses the new include features, introduced in version 1.7.2
and shows how it all works with autoBraces-OFF.
The enhanced includes work the following way:
The tag {%include include.tpl%} includes the given file, which is searched
for in the templateDir first and in the include path second. The included file
includes another file again, you can nest them as deep as you want!
NOTE: Recursive nesting will cause a warning!
The autoBraces-OFF are used here and we are using macros {%include include.mcr%}.
Since autoBraces is OFF we need a new macro tag to be introduced:
it is the {%endmacro%} this is needed to tell the end of a macro, since
autoBraces is not on, you need to tell the end of a macro manually.
---------------------------
i am a text from include.tpl
i am a text from include1.tpl
this is text from the macro {%include_text()%}
which is in the file include.mcr
this is text from the macro {%include1_text()%}
which is in the file include1.mcr
----------------------------
just to show the if and foreach constructs, well you know them from PHP
those are the if(): and endif and alikes.
one
two
three