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 %}
|
||||
{% 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 %}
|
||||
|
@ -31,6 +41,10 @@
|
|||
{% include 'partials/breadcrumbs.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
<h2>
|
||||
{{page_title}}
|
||||
</h2>
|
||||
|
||||
{% for child in collection %}
|
||||
{% include 'partials/blog_item.html.twig' with {'page':child, 'truncate':true} %}
|
||||
{% endfor %}
|
||||
|
@ -45,5 +59,3 @@
|
|||
{% endblock %}
|
||||
|
||||
{% endembed %}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue