{% load custom_filters %}
{% load url from future %}

<h3>Categories</h3>

<div style="clear:both;"></div>
<div class="columns">
{% if categories|slice:"1:" %}
    <div class="colleft">
        <ul>
            {% for category in categories|firsthalf %}
            <li><a href="{% url 'horizon:murano:catalog:index' %}?category={{ category|urlencode }}">{{ category }}</a></li>
            {% endfor %}
        </ul>
    </div>

    <div class="colright">
        <ul>
            {% for category in categories|lasthalf %}
            <li><a href="{% url 'horizon:murano:catalog:index' %}?category={{ category|urlencode }}">{{ category }}</a></li>
            {% endfor %}
        </ul>
    </div>
{% else %}
    <a href="{% url 'horizon:murano:catalog:index' %}?category={{ categories.0|urlencode }}">{{ categories.0 }}</a>
{% endif %}
</div>
