Adding 'active' class via matching current url with category.url.

Hi all.

I'm trying to list up solution categories as menu in header by following codes.

{% for category in portal.solution_categories %}

    {% if category.folders_count > 0 %} 

        <a href="{{category.url}}" class="{% if category.url == ????? %}active{% endif %}">{{ }}</a>

    {% endif %}

{% endfor %}

What I want to ask is the part of '????'. How can I add 'active' class when the page is the category page.

Login or Signup to post a comment