title: Setting current category to active
body: <p>When on a category page I'm hoping to add an "active" class the current pages relevant link to show which category is selected in the menu.</p>
  
  <p>Currently I'm listing all post categories and linking to their relevant pages via</p>
  
  <pre><code>{% for cat in categories %}
  
      &lt;li&gt;&lt;a style="margin: 0;" href="{{ cat.link }}" class=""&gt;{{cat.name}}&lt;/a&gt;&lt;/li&gt;
  
  {% endfor %}
  </code></pre>
  
  <p>I have tried using if statements but can't seem to get it right.</p>