mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-23 10:00:52 +02:00
feat(collection): add exclude_publication_type
filter
This commit is contained in:
parent
c3d23d929b
commit
41bd113535
2 changed files with 6 additions and 0 deletions
|
@ -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 }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue