Forgive me for this question but it seems the kind of thing that is so obvious I can’t seem to find anything on it and the docs are not helping me.
I have a few blueprints: artist, event, default.
I used the starter kit as a guideline to create this as well as sample blueprints from the Kirby docs. I’m using the plain kit as a base.
I’m trying to access
1 - all the pages on my Kirby website
2 - all the pages belonging to a specific “type” (blueprint)
<ul>
{% for child in site.children() %}
<li><a href="{{ child.url }}">{{ child.title }}</a></li>
{% endfor %}
</ul>
This will only give me two pages: Error and Home. I’ve read up on Kirby’s query language and tried multiple examples including things like site.children.listed.template('artist')
which shows nothing at all.
I’m templating using Twig which might add to the confusion but it’s almost 10 years since I used “pure” PHP.
The twig {{ dump() }} doesn’t seem to work with Kirby (I’ve read a post on this issue I can’t find again) so I’ve been trying to check what I can access via {{ site.children()|json_encode(constant('JSON_PRETTY_PRINT')) }}
but I guess I’m missing something because all I get is null or, in this case, the confusing
{ "data": { "error": { "content": {}, "translations": null, "children": null, "drafts": null, "childrenAndDrafts": null }, "home": { "content": {}, "translations": null, "children": null, "drafts": null, "childrenAndDrafts": null } } }
So any help on debugging with Twig would be appreciated. I think I’m missing something about the overall structure of Kirby which I can’t seem to get right even going through the Docs.