diff options
Diffstat (limited to 'layouts/partials/navigators/sidebar.html')
-rw-r--r-- | layouts/partials/navigators/sidebar.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/partials/navigators/sidebar.html b/layouts/partials/navigators/sidebar.html index 75d0dcf..cc92c94 100644 --- a/layouts/partials/navigators/sidebar.html +++ b/layouts/partials/navigators/sidebar.html @@ -1,8 +1,8 @@ -{{ range .menus }} +{{ range .menuItems }} {{ $class:= "" }} {{ $icon:= "fa-plus-circle" }} <!-- If the current menu is the selected menu or it contain the selected menu, set expand icon and set "active" class --> - {{ if or ($.ctx.HasMenuCurrent "sidebar" .) ($.ctx.IsMenuCurrent "sidebar" .)}} + {{ if or ($.ctx.HasMenuCurrent $.menuName .) ($.ctx.IsMenuCurrent $.menuName .)}} {{ $icon = "fa-minus-circle"}} {{ $class = "active" }} {{end}} @@ -12,7 +12,7 @@ <i class="fas {{ $icon }}"></i><a class="{{$class}}" href="{{ .URL }}">{{.Name}}</a> <!-- Add sub-tree --> <ul class="{{ $class }}"> - {{ partial "navigators/sidebar.html" (dict "menus" .Children "ctx" $.ctx) }} + {{ partial "navigators/sidebar.html" (dict "menuName" $.menuName "menuItems" .Children "ctx" $.ctx) }} </ul> </li> {{ else }} |