diff options
author | tdro <tdro@noreply.example.com> | 2022-12-06 23:43:53 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-12-06 23:43:53 -0500 |
commit | 0f64a4206a109e4643aca07772d6091f9607068c (patch) | |
tree | 750152654fd316c5bd93b0503a1c55812e46795e /themes/default/layouts/partials/function-filters-content.html | |
parent | cf600839a84be5245397c22658462edbea001157 (diff) | |
download | canory-0f64a4206a109e4643aca07772d6091f9607068c.tar.gz canory-0f64a4206a109e4643aca07772d6091f9607068c.tar.bz2 canory-0f64a4206a109e4643aca07772d6091f9607068c.zip |
themes/default/layouts/partials: Consolidate the content filter into a function
Diffstat (limited to 'themes/default/layouts/partials/function-filters-content.html')
-rw-r--r-- | themes/default/layouts/partials/function-filters-content.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/function-filters-content.html b/themes/default/layouts/partials/function-filters-content.html new file mode 100644 index 0000000..8ebad51 --- /dev/null +++ b/themes/default/layouts/partials/function-filters-content.html @@ -0,0 +1,10 @@ +{{- $input := . -}} + +{{- $notExpired := where $input "Params.expirydate" "eq" nil -}} +{{- $notUnlisted := where $input "Params.unlisted" "eq" nil -}} + +{{- $filteredPages := $notExpired | intersect $notUnlisted -}} + +{{- $output := $filteredPages -}} + +{{- return $output -}} |