Children attribute in response

Hi everyone

i have a collection with “Custom sortable entries” activated. When i do a api call without a body i always obtain entries that include a “children” attribute ex:“children”: []

when i add a body to my collection request … something like that

the children attribute is not present in response. Is this normal ?

Thanks for your help

You have a typo: sort instead of sorts.

Yes. Sorting and filtering breaks the children mechanism.
See also:

Thanks for your reply … :slight_smile: i will fix my typo

Will this be added as a bug or this will stay like that ?

I think, it will stay like that. It is unpredictable, how different users want to sort their nested items, so it’s hard de define a default, that fits all needs.

For example, if you have parent pages and child pages, that share the same categories. Now you filter by category. If a child page has that category, but not it’s parent page - how would you nest it in the output?

This could be solved in an addon, that declares some common defaults, so it won’t break the behaviour for all users.