mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 20:14:15 +00:00
feat(collection): add exclude_publication_type filter
This commit is contained in:
1 parent
c3d23d929b
commit
41bd113535
2 files changed
+6
No files matched your search
@@ -42,6 +42,9 @@
|
||||
{{ $archive_page = site.GetPage (printf "publication_types/%s" $block.content.filters.publication_type) }}
|
||||
{{ $query = $query | intersect $archive_page.Pages }}
|
||||
{{ end }}
|
||||
{{ if $block.content.filters.exclude_publication_type }}
|
||||
{{ $query = $query | complement (site.GetPage (printf "publication_types/%s" $block.content.filters.exclude_publication_type)).Pages }}
|
||||
{{ end }}
|
||||
{{ if $block.content.filters.author }}
|
||||
{{ $archive_page = site.GetPage (printf "authors/%s" (urlize $block.content.filters.author)) }}
|
||||
{{ $query = $query | intersect $archive_page.Pages }}
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
{{ $archive_page = site.GetPage (printf "publication_types/%s" $block.content.filters.publication_type) }}
|
||||
{{ $query = $query | intersect $archive_page.Pages }}
|
||||
{{ end }}
|
||||
{{ if $block.content.filters.exclude_publication_type }}
|
||||
{{ $query = $query | complement (site.GetPage (printf "publication_types/%s" $block.content.filters.exclude_publication_type)).Pages }}
|
||||
{{ end }}
|
||||
{{ if $block.content.filters.author }}
|
||||
{{ $archive_page = site.GetPage (printf "authors/%s" (urlize $block.content.filters.author)) }}
|
||||
{{ $query = $query | intersect $archive_page.Pages }}
|
||||
|
||||
Reference in new issue
Block a user