{% load pages_tags %}

{% if page_branch_in_menu %}
<ul>
  {% for page in page_branch %}
  {% if page.in_menu %}
  <li>
    <a href="{{ page.get_absolute_url }}">{{ page.title }}</a>
    {% if page.branch_level == 0 and page.has_children_in_menu %}
      {% page_menu page %}
    {% endif %}
  </li>
  {% endif %}
  {% endfor %}
</ul>
{% endif %}

{% load pages_tags %}

{% if page_branch_in_menu %}
<ul>
  {% for page in page_branch %}
  {% if page.in_menu %}
  <li{% if page.is_current_or_ascendant %} class="here"{% endif %}>
  <a{% if page.is_current_or_ascendant %} class="here"{% endif %}
    href="{{ page.get_absolute_url }}">{{ page.title }}</a>
    {% if page.branch_level == 0 and page.has_children_in_menu %}
      {% page_menu page %}
    {% endif %}
  </li>
  {% endif %}
  {% endfor %}
</ul>
{% endif %}

Use 'here' classes in the top nav menu
Use 'here' classes in the top nav menu

The li and the anchor for current_or_ascendant pages should have a
'here' class. The anchor doesn't strictly need it, but it's more
convenient for the designers that way.
