diff --git a/exampleSite/content/home/featured.md b/exampleSite/content/home/featured.md index 345b6eac..f3df47e5 100644 --- a/exampleSite/content/home/featured.md +++ b/exampleSite/content/home/featured.md @@ -21,6 +21,9 @@ subtitle = "" # Page order. Descending (desc) or ascending (asc) date. order = "desc" + # Show a "See all pages" link underneath the featured content? + link_to_archive = false + # Filter posts by a taxonomy term. [content.filters] tag = "" diff --git a/layouts/partials/widgets/featured.html b/layouts/partials/widgets/featured.html index 91bb1f91..af8aaaac 100644 --- a/layouts/partials/widgets/featured.html +++ b/layouts/partials/widgets/featured.html @@ -9,6 +9,7 @@ {{/* Query */}} {{ $query := where (where site.RegularPages "Type" $items_type) "Params.featured" true }} +{{ $archive_page := site.GetPage "Section" $items_type }} {{/* Filters */}} {{ if $st.Params.content.filters.tag }} @@ -31,6 +32,18 @@ {{/* Limit */}} {{ $query = first $items_count $query }} +{{/* Localisation */}} +{{ $i18n := "" }} +{{ if eq $items_type "post" }} + {{ $i18n = "more_posts" }} +{{ else if eq $items_type "talk" }} + {{ $i18n = "more_talks" }} +{{ else if eq $items_type "publication" }} + {{ $i18n = "more_publications" }} +{{ else }} + {{ $i18n = "more_pages" }} +{{ end }} +