I have a simple nav set up using Globals in a table, but I'm struggling to get it to add an active class to only the active page.
The below code adds the nav links, but I need to know what to add to it to get the active class on only the current page.
Need a little help please?
{% if mainNav.navitems|length %}
{% for row in mainNav.navitems %}
<li><a href="{{ row.url }}">{{ row.name }}</a></li>
{% endfor %}
{% endif %}