Skip to content

Commit

Permalink
fix(widget): allow spaces in filters in Pages and Featured widgets
Browse files Browse the repository at this point in the history
Fix #1388
  • Loading branch information
gcushen committed Oct 19, 2019
1 parent bbda2cc commit 5abeaaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/widgets/featured.html
Expand Up @@ -12,11 +12,11 @@

{{/* Filters */}}
{{ if $st.Params.content.filters.tag }}
{{ $archive_page := site.GetPage (printf "tags/%s" $st.Params.content.filters.tag) }}
{{ $archive_page := site.GetPage (printf "tags/%s" (urlize $st.Params.content.filters.tag)) }}
{{ $query = $query | intersect $archive_page.Pages }}
{{ end }}
{{ if $st.Params.content.filters.category }}
{{ $archive_page := site.GetPage (printf "categories/%s" $st.Params.content.filters.category) }}
{{ $archive_page := site.GetPage (printf "categories/%s" (urlize $st.Params.content.filters.category)) }}
{{ $query = $query | intersect $archive_page.Pages }}
{{ end }}
{{ if $st.Params.content.filters.publication_type }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/widgets/pages.html
Expand Up @@ -19,11 +19,11 @@

{{/* Filters */}}
{{ if $st.Params.content.filters.tag }}
{{ $archive_page = site.GetPage (printf "tags/%s" $st.Params.content.filters.tag) }}
{{ $archive_page = site.GetPage (printf "tags/%s" (urlize $st.Params.content.filters.tag)) }}
{{ $query = $query | intersect $archive_page.Pages }}
{{ end }}
{{ if $st.Params.content.filters.category }}
{{ $archive_page = site.GetPage (printf "categories/%s" $st.Params.content.filters.category) }}
{{ $archive_page = site.GetPage (printf "categories/%s" (urlize $st.Params.content.filters.category)) }}
{{ $query = $query | intersect $archive_page.Pages }}
{{ end }}
{{ if $st.Params.content.filters.publication_type }}
Expand Down

0 comments on commit 5abeaaa

Please sign in to comment.