If you use Cheetah, please support the project and register by clicking here:


9.8 #stop

Syntax:

#stop

The #stop directive is used to stop processing of a template at a certain point. The output will show only what has been processed up to that point.

When #stop is called inside an #include it skips the rest of the included code and continues on from after the #include directive. stop the processing of the included code. Likewise, when #stop is called inside a #def or #block, it stops only the #def or #block.

A cat
#if 1
  sat on a mat
  #stop
  watching a rat
#end if
in a flat.

will print

A cat
  sat on a mat

And

A cat
#block action
  sat on a mat
  #stop
  watching a rat
#end block
in a flat.

will print

A cat
  sat on a mat
in a flat.

If you use Cheetah, please support the project and register by clicking here: