Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Fetching all pages of specific pagetype over multiple sites



We are currently using IPageCriteriaQueryService which allows me to fetch all pages of a specific type with FindPagesWithCriteria. My problem is that a pagereference parameter is required and I need to fetch all pages of a specific type regardless of startpage or site (we have multiple sites sharing EPIServer database).

Does anyone have an idea of the best way to achieve this?


Nov 03, 2016 14:52

Check out the ContentModelUsage class :)

List<ContentReference> references = contentModelUsage.ListContentOfContentType(myContentType).Select(x => x.ContentLink.ToReferenceWithoutVersion()).ToList();

or use root page as start for search?

Edited, Nov 03, 2016 16:29

@Daniel Ovaska Thanks a bunch!

Nov 04, 2016 7:46
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.