Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (23 sloc) 813 Bytes
<nav>
<ul>
{% for item in site.conference.site_navigation %}
{% if item.url and item.title %}
{% assign item_title = item.title %}
{% assign item_url = item.url | replace: "baseurl", site.baseurl %}
{% else %}
{% assign matching_pages = site.pages | where: "name", item %}
{% assign item_title = matching_pages[0].title %}
{% assign item_url = matching_pages[0].url | relative_url %}
{% endif %}
{% assign current_url = page.url | relative_url %}
{% if current_url == item_url or page.has-nav == item %}
{% assign item_selected = ' class="menuactive"'%}
{% else %}
{% assign item_selected = ""%}
{% endif %}
<li{{ item_selected }}><a href="{{ item_url }}">
<span>{{ item_title }}</span>
</a></li>
{% endfor %}
</ul>
</nav>