title: Inheritance in Slim template language
body: <p>With PHP using Twig I can do something like this:</p>
  
  <p>layout.twig</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  {% block content %}{% endblock %}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>form.twig</p>
  
  <pre><code>{% extends "layout.twig" %}
  {% block content %}
  &lt;div class="form"&gt;{% block form %}{% endblock %}&lt;/div&gt;
  {% endblock %}
  </code></pre>
  
  <p>login.twig</p>
  
  <pre><code>{% extends form %}
  {% block form %}
  &lt;form&gt;
      &lt;input type="text" name="email" /&gt;
      &lt;input type="submit"&gt;
  &lt;/form&gt;
  {% endblock %}
  </code></pre>
  
  <p>This way I have a layout for all pages, a layout for pages with forms and login page.</p>
  
  <p>But with Slim I can specify only main layout that is parent for all templates:</p>
  
  <p>layout.slim</p>
  
  <pre><code>html
    body ==yield
  </code></pre>
  
  <p>and special layouts for every page on my site:<br>
  login.slim</p>
  
  <pre><code>div.form
    form
      input type="text" name="email"
      input type="submit"
  </code></pre>
  
  <p>Is there a simple way to realize Twig-like inheritance with more than one level in Slim?</p>