Skip to content

Commit 1ee42d3

Browse files
committed
Reset tag filter if it's link was clicked again
1 parent 559b771 commit 1ee42d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/blog/_post_tags.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% if not post.tags.empty %}
22
<p class="post-tags">
33
{% for tag in post.tags %}
4-
<a href="{{ path('blog_index', {'tag': tag.name}) }}"
4+
<a href="{{ path('blog_index', {'tag': tag.name == app.request.query.get('tag') ? null : tag.name}) }}"
55
class="label label-{{ tag.name == app.request.query.get('tag') ? 'success' : 'default' }}"
66
>
77
<i class="fa fa-tag"></i> {{ tag.name }}

0 commit comments

Comments
 (0)