mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-07-03 00:28:55 +00:00
Added filter by URI on results page by taxonomy
This commit is contained in:
parent
8cea815bc8
commit
d55f25c9b5
1 changed files with 16 additions and 4 deletions
|
@ -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 %}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue