Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
so request.path does not equal '/phylosophy'. I think the answer lies there {{ request.path }}
I think it's not good to hardcode urls, because there are {% url %}
And then there will be no such misunderstandings.
{% url 'phylosophy' as url %}
<a href='{{ url }}' {% if request.path == url %}class="active"{%endif %}>philosophy</a>
Alternative via javascript https://css-tricks.com/snippets/jquery/add-active-...
Vue completely replaces the element it's initialized on, read the data through normal DOM api before vue is initialized
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question