I want to do list-and-detail in a page collection that isn’t a self collection.
In a self collection it’s easy enough, using a template containing this construction:
{% for child in page.collection %}
<li><a href="{{ page.url }}/{{ child.slug }}">{{ child.title }} </a></li>
{% endfor %}
I can’t see how to do it in the case I’m working with, where the collection header is:
items:
'@page': '/PAGENAME'
At least, I can see how to do it if I hardwire the page name into the template, like this:
{% for child in page.collection %}
<li><a href="/PAGENAME/{{ child.slug }}">{{ child.title }} </a></li>
{% endfor %}
But surely page name shouldn’t be hardwired into templates.
What’s the right way to do it, please?