Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Maybe this can come handy: http://blog.mathiaskunto.com/2012/03/25/revisited-and-improved-pagetype-based-filtering-of-episervers-editmode-pagetree/
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;
criterias.Add(criteria);
PageDataCollection pages = DataFactory.Instance.FindPagesWithCriteria(PageReference.StartPage, criterias);
The PageTypeUtil module on EPiCode (https://www.coderesort.com/p/epicode/wiki/EPiPageTypeUtil/About) also gives you the option to list pages of a certain pagetype.
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.