Add blocks to nav_primary.html to make it easier to customise
{% load category_tags %}
{% load i18n %}
-<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+<nav class="{% block nav_classes %}navbar navbar-expand-lg navbar-dark bg-dark{% endblock %}">
+ {% block navbar_toggler %}
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
+ {% endblock %}
+ {% block navbar_basket %}
<a class="btn btn-secondary float-right btn-cart ml-auto d-inline d-sm-none" href="{% url 'basket:summary' %}">
<i class="fas fa-shopping-cart"></i>
{% trans "Basket" %}
{% endif %}
{% endif %}
</a>
+ {% endblock %}
+ {% block navbar_collapse %}
<div class="collapse navbar-collapse" id="navbarSupportedContent">
+ {% block nav %}
<ul class="navbar-nav mr-auto">
+ {% block nav_items %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- {% trans "Browse store" %}
+ {% block browse_store_text %}{% trans "Browse store" %}{% endblock %}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{% category_tree depth=1 as tree_categories %}
{% endblock %}
</div>
</li>
+ {% endblock %}
</ul>
+ {% endblock %}
+ {% block nav_extra %}
{% include "oscar/partials/search.html" %}
+ {% endblock %}
</div>
+ {% endblock %}
</nav>
