Try our conversational search powered by Generative AI!

Find a page by page type


Is there some way I can find pages that use a specific page type?

I need to debug a specific page type but I can't find/don't know which pages that use it.

Aug 29, 2013 10:01

If you just need a list of the pages using a certain pagetype you could use the oldest trick in the book:

1. BE SURE that at least one page in your pagetree uses that pagetype. (create a new page somewhere if you're not sure)

2. Go to admin mode > pagetypes tab > your pagetype

3. Try to delete the pagetype.

You'll get an error saying there are existing pages using that pagetype, and the pages will be listed for you.


If you need to find the pages in code you could go for a FindPagesWithCriteria approach with PageTypeId as the critera:

PropertyCriteriaCollection criterias = new PropertyCriteriaCollection();

PropertyCriteria criteria = new PropertyCriteria();
criteria.Condition = CompareCondition.Equal;
criteria.Name = "PageTypeID";
criteria.Type = PropertyDataType.PageType;
criteria.Value = PageType.Load("PageTypeNewsItem").ID.ToString(); // PTB: check out PageTypeResolver
criteria.Required = true;

PageDataCollection pages = DataFactory.Instance.FindPagesWithCriteria(PageReference.StartPage, criterias);


Edited, Sep 26, 2013 23:44

The PageTypeUtil module on EPiCode ( also gives you the option to list pages of a certain pagetype.

Sep 27, 2013 8:46

Thanks Arild for your replies.

Sep 27, 2013 9:58
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.