From: David Lord Date: Fri, 18 Oct 2019 18:31:00 +0000 (-0700) Subject: document behavior of block tag in if block X-Git-Tag: 2.11.0~38^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aad4dcfc0f6ef07d5f73c65a11e5e674dc89339b;p=thirdparty%2Fjinja.git document behavior of block tag in if block closes #423 --- diff --git a/docs/templates.rst b/docs/templates.rst index f1f3c2f0..46a237f4 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -370,6 +370,10 @@ In this example, the ``{% block %}`` tags define four blocks that child template can fill in. All the `block` tag does is tell the template engine that a child template may override those placeholders in the template. +``block`` tags can be inside other blocks such as ``if``, but they will +always be executed regardless of if the ``if`` block is actually +rendered. + Child Template ~~~~~~~~~~~~~~