fix configurable navbar count
replace all evidences of "5" by $maxnavitems
This commit is contained in:
parent
dfb7bb3a91
commit
3049cbfd0b
1 changed files with 2 additions and 2 deletions
|
@ -83,7 +83,7 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{ if gt $sectionCount 5 }}
|
||||
{{ if gt $sectionCount $maxnavitems }}
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{i18n "more" }}</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
|
@ -91,7 +91,7 @@
|
|||
{{ range sort $sections "section.weight" }}
|
||||
{{ if and (.section.enable) (.section.showOnNavbar) }}
|
||||
{{ $sectionCount = add $sectionCount 1}}
|
||||
{{ if gt $sectionCount 5 }}
|
||||
{{ if gt $sectionCount $maxnavitems }}
|
||||
<a class="dropdown-item" href="#{{ partial "helpers/get-section-id.html" . }}">{{ .section.name }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue