title: How to exclude a twig partial from a base extend in Symfony on some pages only?
body: <p>Is there a way to specify an &quot;extend&quot; in Twig to exclude one of its included partials ?</p>
  <p>To better explain myself, here is my base.html.twig</p>
  <pre><code>&lt;body&gt;
          {% include '/main/_navbar.html.twig' %}
          {% block body %}
              {% for flashError in app.flashes('success') %}
                  &lt;div class=&quot;alert alert-success&quot; role=&quot;alert&quot;&gt;{{ message }}&lt;/div&gt; 
              {% endfor %}
          {% endblock %}
          {% include '/main/_footer.html.twig' %}
          &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js&quot;&gt;&lt;/script&gt;
          &lt;script src=&quot;{{ asset('script/app.js') }}&quot;&gt;&lt;/script&gt;
      &lt;/body&gt;
  </code></pre>
  <p>On my login page, I do not need my <code>_navbar.html.twig</code> partial. Is there a way to <strong>not include</strong> (exclude) it knowing my view <code>extends</code> from this <code>base</code> template ? Are there any &quot;options&quot; I could pass behind that <code>extends</code> ?</p>
  <p>This is the code I use to <code>extend</code> my base template on my login page :</p>
  <pre><code>{% extends 'base.html.twig' %}
  </code></pre>