Discussions
Filter Tag with with_scope doesne't work
over 8 years ago by Tobias Zoll
Hi,
i got a problem while trying to filter my blog entries through with_scope. In wagon my filter system it worked quiet well. But when i deploy it to my locomotive site it won't filter these entries anymore.
Here is my Code:
{% assign currenttag = params['tag'] %}
{% with_scope tags: currenttag %}
{% paginate contents.blog by 5 %}
{% for post in paginate.collection %}
<h5><a href="{{ post._slug }}">{{ post.title }}</a></h5>
<p>{{ post.text | truncatewords: 50 }}</p>
<a href="{{ post._slug }}" class="button float-right">Weiterlesen</a>
</div>
</div>
{% endfor %}
<div class="row content-top-min content-bottom-min">
<div class="large-12 columns text-center">
{% if paginate.previous_page %}
<a href="?tag={{currenttag}}&page={{paginate.previous_page}}" class="button arrow">
<i class="material-icons">arrow_back</i>
</a>
{% endif %}
{% if paginate.next %}
<a href="?tag={{currenttag}}&page={{ paginate.next_page }}" class="button arrow">
<i class="material-icons">arrow_forward</i>
</a>
{% endif %}
</div>
</div>
{% endpaginate %}
{% endwith_scope %}