-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add parameter and condition to bg_active_nav if primary nav or sidebar nav * Set target active state based on if current link is part of the path
- Loading branch information
1 parent
45ca601
commit 6567bdc
Showing
3 changed files
with
13 additions
and
10 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
network-api/networkapi/templates/fragments/buyersguide/about_nav.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
{% load bg_nav_tags i18n wagtailroutablepage_tags %} | ||
|
||
{% with request.get_full_path as current_url %} | ||
{% routablepageurl page 'about-why-view' as about_why_url %} | ||
{% routablepageurl page 'how-to-use-view' as how_to_use_url %} | ||
{% routablepageurl page 'about-why-view' as about_why_url %} | ||
{% routablepageurl page 'methodology-view' as methodology_url %} | ||
{% routablepageurl page 'contact-view' as contact_url %} | ||
{% routablepageurl page 'press-view' as press_url %} | ||
|
||
<div class="col-lg-3"> | ||
<nav class="vertical-nav mt-5 pt-sm-2" title="{% trans "about sections" context "Tooltip on menu items" %}"> | ||
<div class="multipage-link-wrapper"><a class="multipage-link about-link {% bg_active_nav current_url about_why_url %}" href="{{ about_why_url }}">{% trans "Why we made this guide" %}</a></div> | ||
<div class="multipage-link-wrapper"><a class="multipage-link about-link {% bg_active_nav current_url how_to_use_url %}" href="{{ how_to_use_url }}">{% trans "How to use this guide" %}</a></div> | ||
<div class="multipage-link-wrapper"><a class="multipage-link about-link {% bg_active_nav current_url about_why_url %}" href="{{ about_why_url }}">{% trans "Why we made this guide" %}</a></div> | ||
<div class="multipage-link-wrapper"><a class="multipage-link about-link {% bg_active_nav current_url methodology_url %}" href="{{ methodology_url }}">{% trans "Methodology" %}</a></div> | ||
<div class="multipage-link-wrapper"><a class="multipage-link about-link {% bg_active_nav current_url contact_url %}" href="{{ contact_url }}">{% trans "Contact us" %}</a></div> | ||
<div class="multipage-link-wrapper"><a class="multipage-link about-link {% bg_active_nav current_url press_url %}" href="{{ press_url }}">{% trans "Press" %}</a></div> | ||
</nav> | ||
</div> | ||
|
||
{% endwith %} | ||
{% endwith %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters