Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ul id="menu">
- {% with request.resolver_match.url_name as url_name %}
- <ul>
- <li class="{% if url_name == 'main' %}active{% endif %}">
- main
- </li>
- <li class="{% if url_name == 'news_index' %}active{% endif %}">
- <a href="{% url 'news_index' %}">news</a>
- </li>
- </ul>
- {% endwith %}
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement