Given a structure that has, for example, three levels of content—how do I just iterate over it and create a nested <ul>
reflecting the hierarchy and containing the title
and slug
(as a link) of each entry?
The following just gives me a flat representation of the structure:
<div class="panel">
<h2>People</h2>
<ul>
{% for entry in craft.entries.section('people') %}
<li><a href="{{ entry.url }}">{{ entry.title }}</a></li>
{% endfor %}
</ul>
</div>