My site has a varied structure where where the parent 1 node contains items of different document type called X (example). Then parent 2 contains more nodes of the same document type X as parent 1 and this pattern continues.
I'm trying to return all the items of the document X and then have the parent node listed too.
I read I could use IContentTypeService but some suggest this is slow and to use IPublishedContent. I read up on the documentation but not really sure where to start?
Return content by document type
Hi
My site has a varied structure where where the parent 1 node contains items of different document type called X (example). Then parent 2 contains more nodes of the same document type X as parent 1 and this pattern continues.
I'm trying to return all the items of the document X and then have the parent node listed too.
I read I could use IContentTypeService but some suggest this is slow and to use IPublishedContent. I read up on the documentation but not really sure where to start?
Could anyone give some starting tips?
Thanks in advance
Hi Keith,
This should help you get started
Umbraco recommend to only use IContentService if you are updating data. If just querying then use IPublishedContentQuery.
https://docs.umbraco.com/umbraco-cms/v/13.latest-lts/reference/querying/ipublishedcontentquery
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.