5.6 Stop template rendering - #stop

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]Caution

While #stop ends the rendering process, it does not affect the template parsing. If you have a syntax error in the VTL code after the #stop directive, this error will still be reported.[12]



[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.