Permalink
Browse files

Fix menuitem recursive level index

This fixes the index in cases where there's many sub items inside sub items. 

When we start to go through sub menu items and their sub menu items, the depth grows by 1 level on each recursion. We also need to subtract the added level of depth when "exiting" from each sub menu item.
  • Loading branch information...
ironland committed Oct 22, 2018
1 parent 3a17e52 commit be7f0bd282ac03fd5b2697754d9eb7bec3299e77
Showing with 2 additions and 1 deletion.
  1. +2 −1 partials/menuitem.dust
@@ -13,7 +13,8 @@
{/sub_menu}
{?sub_menu}
</ul>
{@set key="depth_now" subtract=1 /}
{/sub_menu}
{/eq}
{/show_submenu}
</li>
</li>

0 comments on commit be7f0bd

Please sign in to comment.