{% set item = [['one', 'filename'], ['two', 'filename']] %} {% macro active(activePage='') %} {% for a, b in item -%} {%if activePage == a %}{{ a }}{%else%}{{ a }}{% endif %} {% endfor -%} {%- endmacro %} {% macro top() %}