I have made sidebar in sidebar.html and had include it in main.html as well as dashboard.html through django include tag to reduce data reduntancy->
{% include 'employee/sidebar.html' %}
{% block content %}
{% endblock %}
Now how do I make different elements (in sidebar) active according to the different pages? Like for example, When I am on dashboard.html , dashboard should be active in sidebar.
Here is sidebar.html
<ul>
<li class="nav-item">
<a class="nav-link" href="admin_dashboard.html">
<span>Dashboard</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="main.html">
<span>Create</span></a>
</li>
</ul>