<ul class="nav nav-pills">
  {% for item in legal_menu %}
    <li {% if item.0 == legal_page %}class="active"{% endif %}>
      <a href="{% url item.1 %}">{{ item.2 }}</a>
    </li>
  {% endfor %}
</ul>
