title: Active Menu using Django passing it along templates
body: <p>This example at <a href="http://djangosnippets.org/snippets/2421/" rel="nofollow">http://djangosnippets.org/snippets/2421/</a> works as it is.</p>
  
  <p><strong>Placed in templates/includes/tabs.html</strong></p>
  
  <pre><code>    &lt;ul class="tab-menu"&gt;
          &lt;li class="{% if active_tab == 'tab1' %} active{% endif %}"&gt;&lt;a href="#"&gt;Tab 1&lt;/a&gt;&lt;/li&gt;
          &lt;li class="{% if active_tab == 'tab2' %} active{% endif %}"&gt;&lt;a href="#"&gt;Tab 2&lt;/a&gt;&lt;/li&gt;
          &lt;li class="{% if active_tab == 'tab3' %} active{% endif %}"&gt;&lt;a href="#"&gt;Tab 3&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  </code></pre>
  
  <p><strong>Placed in your page.html template</strong></p>
  
  <pre><code>    {% include "includes/tabs.html" with active_tab='tab1' %}
  </code></pre>
  
  <p>The variable gets passed along from page template to tabs.html. </p>
  
  <p>How would you pass active tab variable from:</p>
  
  <pre><code>- page.html (pass active tab1)
      -   extends base.html
          - includes tabs.html (how to get it here.)
  </code></pre>