2 Copyright (C) The Arvados Authors. All rights reserved.
4 SPDX-License-Identifier: CC-BY-SA-3.0
7 {% assign highlighturl = "" %}
8 {% for section in site.navbar[page.navsection] %}
9 {% for entry in section %}
11 Want to highlight the current page on the left nav.
12 But some pages have been renamed with a symlink from the old page to the new one.
13 Then the URL won't match.
14 So if the URL doesn't match, as a fallback look for a page with a matching title.
17 {% for item in entry[1] %}
18 {% if site.pages[item].url == page.url %}
19 {% assign highlighturl = site.pages[item].url %}
23 {% if highlighturl == "" %}
24 {% for item in entry[1] %}
25 {% if site.pages[item].title == page.title %}
26 {% assign highlighturl = site.pages[item].url %}
33 <div class="col-sm-3">
35 <ol class="nav nav-list">
36 {% for section in site.navbar[page.navsection] %}
37 {% for entry in section %}
38 <li><span class="nav-header">{{ entry[0] }}</span>
39 <ol class="nav nav-list">
40 {% for item in entry[1] %}
41 {% assign p = site.pages[item] %}
42 <li {% if p.url == highlighturl %} class="active activesubnav" {% elsif p.title == page.subnavsection %} class="activesubnav" {% endif %}>
43 <a href="{{ site.baseurl }}{{ p.url }}">{{ p.title }}</a></li>