Back

Template Source: bdex/public/snippets/_navigation.html

{% load i18n %} {% load cache %} <ul id="main-nav" class="navigation sf-menu"> {% cache 900 "bdex:bdex:public:navigation" %} <li class="navigation-list {% if CAMPAIGN_CATEGORIES.count == 0 %}last{% endif %}" id="nav-campaign-list"> <a href="{% ifequal INSTANCE_ID "sg" %}{% url bdex-public-campaign-list %}?country_code={{ country_code }}{% else %}/{% endifequal %}">{% trans "All" %}</a> {% if ALL_RUNNING_CAMPAIGNS %} <ul class="sub-menu first {% if ALL_RUNNING_CAMPAIGNS.count == 1 %}single{% endif %}"> {% for campaign in ALL_RUNNING_CAMPAIGNS %} <li class="{% if forloop.counter|divisibleby:2 %}right{% else %}left{% endif %}"> <a href="{% url bdex-public-campaign-details campaign.pk %}?country_code={{ country_code }}">{{ campaign.name }}</a> </li> {% endfor %} </ul> {% endif %} </li> {% for category in CAMPAIGN_CATEGORIES %} <li class="navigation-list"> {% with category.name|title as category_name %} <a href="{% url bdex-public-campaign-list-category category.slug %}?country_code={{ country_code }}">{% trans category_name %}</a> {% endwith %} {% if category.campaigns.get_running %} <ul class="sub-menu {% if category.campaigns.get_running.count == 1 %}single{% endif %}"> {% for campaign in category.campaigns.get_running %} <li class="{% if forloop.counter|divisibleby:2 %}right{% else %}left{% endif %}"> <a href="{% url bdex-public-campaign-details campaign.pk %}?country_code={{ country_code }}">{{ campaign.name }}</a> </li> {% endfor %} </ul> {% endif %} </li> {% endfor %} {% endcache %} <li class="navigation-list"> <span class="promo-new">new</span> <a href="{% url bdex-second-hand-landing %}">{% trans "SELL" %}</a> </li> {% if INSTANCE_ID == "sg" %} {% include "bdex/public/snippets/_countries_selection_link.html" %} {% endif %} </ul>