feat: add all method

This commit is contained in:
James Elliott
2022-06-25 13:36:32 +10:00
parent fa01f4ab56
commit b532c69bd7
3 changed files with 8 additions and 4 deletions

View File

@ -39,7 +39,7 @@
{{ if $showFlexSearch -}}
{{ $flexSearch := resources.Get "js/vendor/flexsearch/dist/flexsearch.bundle.js" -}}
{{ $slice = $slice | append $flexSearch -}}
{{ if (isset .Site.Params.options "searchsectionsshow") -}}
{{ if and (isset .Site.Params.options "searchsectionsshow") (not (eq .Site.Params.options.searchSectionsShow "ALL")) -}}
{{ $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) -}}
{{ end -}}
{{ end -}}

View File

@ -79,7 +79,7 @@
{{- $showFlexSearch := .Site.Params.options.flexSearch }}
{{- if $showFlexSearch }}
{{- if (isset .Site.Params.options "searchsectionsshow") }}
{{- if and (isset .Site.Params.options "searchsectionsshow") (not (eq .Site.Params.options.searchSectionsShow "ALL")) }}
{{- $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) }}
{{- end }}
{{- end }}