Skip to content

Commit

Permalink
refactor: menutree does not depend on pagepath being set
Browse files Browse the repository at this point in the history
  • Loading branch information
redimp committed Aug 13, 2024
1 parent 0f20d98 commit 0136a83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion otterwiki/templates/snippets/menutree.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{%- for key, value in menutree.items() recursive -%}
{%- if value["children"] %}
<li>
<details {% if pagepath.lower().startswith(value.path.lower()) %}open{% endif %}>
<details {% if pagepath and pagepath.lower().startswith(value.path.lower()) %}open{% endif %}>
<summary class="sidebarmenu">
<a href="/{{value["path"]}}">{{value["header"]}}</a>
</summary>
Expand Down

0 comments on commit 0136a83

Please sign in to comment.