How to set and test a variable in child template to modify a block in parent template
Nope, that's not going to work unfortunately, due to the way scoping works in Twig. Check out the explanation in the Twig Processing Order &amp; Scope article