In a template, how do I get what page I’m currently on? in Active Menu Items
this my code
{% set navigation_bar = [
(‘/’, ‘web’, ‘HOME’),
(‘/about/’,‘about’,‘ABOUT’)] -%}
{% set active_page = active_page|default('web') -%}
<ul id="navigation" class="ownmenu">
{% for href, id, caption in navigation_bar %}
<li {% if id == active_page %} class="active"{% endif
%}><a href="{{ href|e }}">{{ caption|e }}</a></li>
{% endfor %}
</ul>