Open rwilson opened 8 years ago
After testing a few other cases, this applies to the style
and include
tags as well. Are tags intentionally unsupported via {{ block.super }}
?
Hi,
It's been a little while, I'll have to take a look at the specifics, but I suspect it's due to the fact that tags get run at compile time, while block.super operates at runtime on the compiled template.
Hi,
I confirm, it seems like tags in parent's block are ignored if called with {{block.super}}.
It seems
{% style "some/style.css" %}
tags don't render within{{ block.super }}
calls, while explicit<link ... />
tags render as expected within a{{ block.super }}
call.For example, here's a cascading a->b->c hierarchy, each which includes 2 stylesheets in the block
head
: one named"*-style.css"
rendered with a{% style ... %}
tag, and the other"*-link.css"
rendered with an explicit<link ... />
tag.The final child, c, is the only one which renders a link from the
"*-style.css"
tag. The parents do not, even though each child calls{{ block.super }}
. However, the explicit<link ... />
tags are rendered by the{{ block.super }}
calls.a.html
b.html
c.html
I just ran this in a repl for a quick test, here's the output:
Is it intended that style tags do not render within
{{ block.super }}
? If so, is it an intentional behavior that applies to other tags as well? I've only tested withstyle
so far.I also dumped a minimal repro here.