Created
November 10, 2016 16:17
-
-
Save mirshko/6592ef28934438116ce0d5128d53d54f to your computer and use it in GitHub Desktop.
Trying to use `request.path` to add in a class if the URL matches a variable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for item in my_topics %} | |
{% set blog_topic_url = "/blog/topic/{{item.slug}}" %} | |
<li class="{% if request.path == 'blog_topic_url' %}v-active {% endif %} v-tab col s2"><a href="{{ group.absolute_url }}/topic/{{item.slug}}">{{ item }}</a></li> | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment