The #stop
directive stops the rendering of a
template. The remaining part of the template after this directive is
discarded. The most common usage of this directive is debugging
templates.
Example 5.11. Using #stop
to end template
rendering
This part gets rendered in the output. #stop This part does not get rendered.
The #stop
directive can also be written as
#stop()
.
![]() | Caution |
---|---|
While |
[12] It is possible to do strange things by using the
#stop
directive inside #if ... #else
... #end
blocks. As #stop
only ends
the rendering if it is actually rendered, it is possible to skip
over the directive.