]> git.parisson.com Git - mezzo.git/commitdiff
Add an active state to the header menu item links
authorJérémy Fabre <Jeremy@iMac-de-Jeremy-2.fritz.box>
Thu, 9 Feb 2017 18:04:19 +0000 (19:04 +0100)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy-2.fritz.box>
Thu, 9 Feb 2017 18:04:19 +0000 (19:04 +0100)
app/templates/pages/menus/header.html

index 22611127a4a52f95b4b9ebd1af1925993b1f75ae..d82a800b888441cc04814bcf58e21db39317d69f 100644 (file)
@@ -33,7 +33,7 @@
                         </li>
                     {% else %}
                         <li class="nav-header__item">
-                            <a class="nav-header__item-link" href="{{ page.get_absolute_url }}"{% if 'http' in page.link.slug %} target="_blank"{% endif %} title="{{ page.title }}">{{ page.title }}</a>
+                            <a class="nav-header__item-link{% if page.is_current_or_ascendant %} active{% endif %}" href="{{ page.get_absolute_url }}"{% if 'http' in page.link.slug %} target="_blank"{% endif %} title="{{ page.title }}">{{ page.title }}</a>
                         </li>
                     {% endif %}
                 {% endwith %}