{% import _self as self %}
{% macro childNodes(nodes, level) %}
	{% import _self as self %}
	{% if level != 1 %}
		<ul>
	{% endif %}
		{% for node in nodes %}
			<li class="{{node.Class}}">
				<h{{level +1}}>{{node.Hyperlink}}</h{{level +1}}>
				
				{% if node.children %}
					{{ self.childNodes(node.children, min(level + 1, 4)) }}
				{% endif %}
			</li>
		{% endfor %}
	{% if level != 1 %}
		</ul>
	{% endif %}
{% endmacro %}

<h1>{{"Sitemap"|trans}}</h1>
<ul class="sitemap">
	{{ self.childNodes(nodes, 1) }}
</ul>