Support filtering by multiple content types in Delivery API #17917
Closed
bjarnef
started this conversation in
Features and ideas
Replies: 4 comments
-
@kjac FYI 😁 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I like this idea. Shouldn't be too hard to do, either 😄 Note that negation applies to the entire filter query. This means that the syntax will be:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
PR here: #17960 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Will be part of 13.6 and 15.2 👍 see #17960 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently it seems Delivery API doesn't support filtering by multiple content types, which would be useful to extract content nodes in a navigation.
https://docs.umbraco.com/umbraco-cms/13.latest/reference/content-delivery-api#query-parameters-4
It would also align with how we can extract multiple properties.
Perhaps the parameter should still be
contentType
or support namecontentTypes
at some point.Furthermore I think negation is also currently only supported for a single content type:
filter=contentType:!article
A workaround is to implement a custom filter instead.
https://docs.umbraco.com/umbraco-cms/reference/content-delivery-api/extension-api-for-querying#custom-filter
https://discord-chats.umbraco.com/t/23005004/retrieving-multiple-content-types-with-the-delivery-api-newb
Beta Was this translation helpful? Give feedback.
All reactions