Closed conradfuhrman closed 1 month ago
under the hood the children tag is just doing a {{ nav from="{url}" max_depth="1" }} so you could just do that instead as a workaround.
The {{ children }}
tag is only intended to let you list the children of the current page. It won't work as expected inside a collection loop.
Under the hood, it's literally just doing this.
{{ nav:collection:pages :from="current_url" max_depth="1" }}
{{ title }}
{{ /nav:collection:pages }}
In your context, you can swap out current_url
for url
and it should do what you're after.
Bug description
When using the collection tag, then referencing the children tag within the results will throw an error.
How to reproduce
Take a collection and with a result use the children tag.
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
This is a workaround;
But it would be nice to map the children tag when called within a collection to have the same expected results.