fabpot/Twig — Issue #649: Get blocks from rendered template
Author: abxccd
Created: 2012-02-28 05:34:46+00:00
State: open

After playing around with twig, I found that if I use renderBlock() on a template, then it will also included the parent template and extend them even if the if block to be rendered does not require any part of the parent.

However, if an include is used to include other templates, renderBlock() cannot use any of the blocks in the included template.

How can I compile the template including its includes and then extract blocks out of the compiled template?