{% macro options(pages, indent, selectedId, excludeId) %} {% for p in pages %} {% if p.id != excludeId %} {{ _self.options(p.children, indent ~ '    ', selectedId, excludeId) }} {% endif %} {% endfor %} {% endmacro %}