diff options
author | Darshan Baral <darshanbaral@gmail.com> | 2019-07-04 05:58:53 +0300 |
---|---|---|
committer | Darshan Baral <darshanbaral@gmail.com> | 2019-07-04 05:58:53 +0300 |
commit | 391e66a84cac3742bff95fb4404dcebc48f62a58 (patch) | |
tree | a01698b06e25b7b983c4db45561016854d5acfc2 | |
parent | 45e96643bb27c2e3261fa9475d026ec6351e609d (diff) |
Fixed section menu if only one section
-rw-r--r-- | layouts/partials/menu/menu_sections.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/layouts/partials/menu/menu_sections.html b/layouts/partials/menu/menu_sections.html index a07c049..77143f8 100644 --- a/layouts/partials/menu/menu_sections.html +++ b/layouts/partials/menu/menu_sections.html @@ -1,6 +1,8 @@ -{{ if eq 1 (len .Site.Sections) }} +{{ if eq (len (where .Site.Sections "Params.hidefrommenu" "!=" true)) 1 }} <div class="main-menu"> - <a href="{{ `/` | relURL }}">Home</a> + {{ with (index (where .Site.Sections "Params.hidefrommenu" "!=" true) 0) }} + <a href="{{ .Permalink }}">{{ .Title }}</a> + {{ end }} </div> {{ else }} <div class="dropdown"> |