Added filter by URI on results page by taxonomy

This commit is contained in:
pmoreno.rodriguez 2023-01-17 20:57:14 +01:00
parent 8cea815bc8
commit d55f25c9b5

View file

@ -14,6 +14,16 @@
{% set show_pagination = true %} {% set show_pagination = true %}
{% endif %} {% 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 == '/' %} {% if base_url == '/' %}
{% set base_url = '' %} {% set base_url = '' %}
{% endif %} {% endif %}
@ -30,7 +40,11 @@
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %} {% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %} {% include 'partials/breadcrumbs.html.twig' %}
{% endif %} {% endif %}
<h2>
{{page_title}}
</h2>
{% for child in collection %} {% for child in collection %}
{% include 'partials/blog_item.html.twig' with {'page':child, 'truncate':true} %} {% include 'partials/blog_item.html.twig' with {'page':child, 'truncate':true} %}
{% endfor %} {% endfor %}
@ -44,6 +58,4 @@
{% include 'partials/sidebar_left.html.twig' %} {% include 'partials/sidebar_left.html.twig' %}
{% endblock %} {% endblock %}
{% endembed %} {% endembed %}