Skip to content

Commit

Permalink
feat: Show parent in nav if single child is named differently
Browse files Browse the repository at this point in the history
  • Loading branch information
mvsde committed Mar 27, 2019
1 parent 105445f commit a56c1c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>Hello from a thing that is named differntly than the parent thing!</p>
2 changes: 1 addition & 1 deletion ui/templates/nav.njk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

{% set children = item.children %}

{% if (children | length == 1) and children[0].path %}
{% if (children | length == 1) and children[0].path and item.name == children[0].name %}
{{ link(children[0].path, children[0].name) }}
{% elseif children %}
<span class="nav__text nav__text--title">{{ item.name }}</span>
Expand Down

0 comments on commit a56c1c8

Please sign in to comment.