From d55f25c9b50c3f8d51d8d72cb7127b328a0e0922 Mon Sep 17 00:00:00 2001 From: "pmoreno.rodriguez" <60596353+pmoreno-rodriguez@users.noreply.github.com> Date: Tue, 17 Jan 2023 20:57:14 +0100 Subject: [PATCH] Added filter by URI on results page by taxonomy --- templates/blog.html.twig | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/templates/blog.html.twig b/templates/blog.html.twig index 3c9743a..49eaf41 100644 --- a/templates/blog.html.twig +++ b/templates/blog.html.twig @@ -14,6 +14,16 @@ {% set show_pagination = true %} {% endif %} +{% if uri.param('category') %} + {% set page_title = theme_config.listing_title.taxonomy.category | default('Posts in Category: ') ~ uri.param('category') %} +{% elseif uri.param('tag') %} + {% set page_title = theme_config.listing_title.taxonomy.tag | default('Posts with Tag: ') ~ uri.param('tag') %} +{% elseif uri.param('author') %} + {% set page_title = theme_config.listing_title.taxonomy.author | default('Posts from Author: ') ~ uri.param('author') %} +{% else %} + {% set page_title = theme_config.listing_title.blog | default('') %} +{% endif %} + {% if base_url == '/' %} {% set base_url = '' %} {% endif %} @@ -30,7 +40,11 @@ {% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %} {% include 'partials/breadcrumbs.html.twig' %} {% endif %} - + +