How do I nest multiple templates while keeping a wrapper for some pages I'm trying to figure out how to nest 3 templates and have them inherit the blocks. How can I sometimes reference the child.html when I need a wrapper and sometimes not reference it. Maybe I'm trying to do this the wrong way? Thank you for your feedback.

parent.html

{% block contentBlock %}
{% endblock %}


child.html

&lt;div&gt;    
{% extends "parent" %}
{% block content %}
&lt;/div&gt;


child-child.html

{% extends "child" %}
{{ title }}


child2.html

{% extends "parent.html" %}
{% block contentBlock %}
{{ title }}
In my experience, this is the type of situation where you may want to consider having a second layout rather than opting for a more complicated inheritance scheme. If your layouts are somewhat complex and you want to keep your markup DRY I would suggest moving the more complex components of your layout into includes. 

Also, when I get beyond the Layout &raquo; Template relationship, instead of defining blocks and extending the Template I opt for includes there as well. This makes my workflow efficient because I always consider the Template to be the base point, inheriting up into the Layout and inheriting down into any includes.

layout_1col.html

&lt;!DOCTYPE html&gt;
{% include 'head' %}
&lt;body&gt;
  {% include 'header' %}
  &lt;main&gt;
    {% block 'main' %}{% endblock %}
  &lt;/main&gt;
  {% include 'footer' %}
&lt;/body&gt;
&lt;/html&gt;


layout_2col.html

&lt;!DOCTYPE html&gt;
{% include 'head' %}
&lt;body&gt;
  {% include 'header' %}
  &lt;main&gt;
    {% block 'main' %}{% endblock %}
  &lt;/main&gt;
  &lt;aside&gt;
    {% block 'sidebar' %}{% endblock %}
  &lt;/aside&gt;
  {% include 'footer' %}
&lt;/body&gt;


MyTemplate.html

{% extends 'layout_1col' %}
{% block 'main' %}
  &lt;p&gt;My content&lt;/p&gt;
  {% include 'mywidget' %}
{% endblock %}


By letting your layouts rely heavily on includes you can let them vary only where needed but keeping your inheritance logic simple and easily extended.