I have been trying to modify django-oscar's navbar menu. http://latest.oscarcommerce.com/en-gb/
What I can't figure out is that the menu 'browse store' remains open on page load on homepage but opens on click on all other pages. I can't figure out why that would happen. Is there a way to to make it open on hover and to add an <a>
tag on click?
This is the html template concerning the related part in oscar's documentation -
<div class="navbar-collapse primary-collapse collapse">
{% block nav_dropdown %}
<ul id="browse" class="nav navbar-nav">
<li class="dropdown active {% if expand_dropdown %}open{% endif %}">
<a href="#" class="dropdown-toggle" {% if not expand_dropdown %} data-toggle="dropdown"{% endif %}>
<span class="nav-line-1">Shop by</span><span class="nav-line-2"> Category</span>
<b class="caret"></b>
</a>
<ul class="dropdown-menu" data-navigation="dropdown-menu">
{% category_tree depth=2 as tree_categories %}
<li><a tabindex="-1" href="{% url 'catalogue:index' %}">{% trans "All products" %}</a></li>
{% if tree_categories %}
<li class="divider"></li>
{% for tree_category, info in tree_categories %}
{% if info.has_children %}
<li class="dropdown-submenu">
<a tabindex="-1" href="{{ tree_category.get_absolute_url }}">{{ tree_category.name }}</a>
<ul class="dropdown-menu">
{% else %}
<li><a tabindex="-1" href="{{ tree_category.get_absolute_url }}">{{ tree_category.name }}</a></li>
{% endif %}
{% for close in info.num_to_close %}
</ul></li>
{% endfor %}
{% endfor %}
{% endif %}
</ul>
</li>
{% block nav_extra %}
{% endblock %}
</ul>
{% endblock %}
</div><!-- /navbar-collapse -->
</div>