Fallback to page.id if no page.title

- Fix for #4.
- Hiding pages without titles wasn't really an intended behavior.
master
Maya McDougall 4 years ago
parent 780b9484f1
commit 7eabd4cfb9
  1. 4
      index.twig

@ -43,9 +43,9 @@
</div> </div>
<div id="nav" role="navigation" tabindex="-1"> <div id="nav" role="navigation" tabindex="-1">
<ul> <ul>
{% for page in pages(depthOffset=-1) if page.title and not page.hidden %} {% for page in pages(depthOffset=-1) if not page.hidden %}
<li{% if page.id == current_page.id %} class="active"{% endif %}> <li{% if page.id == current_page.id %} class="active"{% endif %}>
<a href="{{ page.url }}">{{ page.title }}</a> <a href="{{ page.url }}">{{ page.title ?: page.id }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>

Loading…
Cancel
Save