{{/* Featured Content Widget */}}

{{/* Initialise */}}
{{ $ := .root }}
{{ $st := .page }}
{{ $items_type := $st.Params.content.page_type | default "post" }}
{{ $items_count := $st.Params.content.count | default 65535 }}
{{ $items_sort := $st.Params.content.order| default "desc" }}

{{/* Query */}}
{{ $query := where (where site.RegularPages "Type" $items_type) "Params.featured" true }}

{{/* Filters */}}
{{ if $st.Params.content.filters.tag }}
  {{ $archive_page := site.GetPage (printf "tags/%s" $st.Param