You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When welcome.stencil is rendered, the HTML from master.stencil is rendered, but the content block overridden in welcome.stencil is completely ignored. Even if you redefine {% block content %}{% endblock %} in app.stencil it still gets ignored.
In addition to this, there should also be a way to render the contents of the parent block you’re overriding, so if we change the above templates:
I'm unfamiliar with Django/Jinja, but Twig (which is based on those) supports both of these and an example can be found here: http://twigfiddle.com/box9s8
The text was updated successfully, but these errors were encountered:
Inheritance in Django/Jinja does certainly work multiple times, and I think it should in Stencil. This is a bug that it doesn't work. Will try taking a look over the weekend.
Inheritance only appears to work once, as soon as you extend twice it no longer inherits blocks from the root template.
Example:
master.stencil
app.stencil
welcome.stencil
When
welcome.stencil
is rendered, the HTML frommaster.stencil
is rendered, but thecontent
block overridden inwelcome.stencil
is completely ignored. Even if you redefine{% block content %}{% endblock %}
inapp.stencil
it still gets ignored.In addition to this, there should also be a way to render the contents of the parent block you’re overriding, so if we change the above templates:
app.stencil
welcome.stencil
The
content
block should render as "Hello World".I'm unfamiliar with Django/Jinja, but Twig (which is based on those) supports both of these and an example can be found here: http://twigfiddle.com/box9s8
The text was updated successfully, but these errors were encountered: