November Happy Hour will be moved to Thursday December 5th.

List pages using a specific template

Vote:
 
Hi, Is there any ready-made sample or a "hidden" tool to show a list of all pages that uses a specific template (or just the count)? I think this would be easy to build, but if there already is an solution I dont have to build one to. Regards, Micke
#12298
Jun 15, 2005 17:13
Vote:
 
I don't have a tool for you, but here is piece of code that finds all pages that use a specific pagetype (in this case pagetype ID 3): // Code below needs these namespaces using EPiServer; using EPiServer.Core; using EPiServer.Filters; ... PropertyCriteriaCollection criterias = new PropertyCriteriaCollection(); PropertyCriteria criteria = new PropertyCriteria(); criteria.Condition = CompareCondition.Equal; criteria.Type = PropertyDataType.PageType; criteria.Value = "3"; criteria.Name = "PageTypeID"; criteria.Required = true; criterias.Add(criteria); PageDataCollection pages = Global.EPDataFactory.FindPagesWithCriteria( Global.EPConfig.StartPage, criterias);
#14019
Jun 16, 2005 18:46
Vote:
 
Thanks!
#14020
Jun 17, 2005 14:34
* 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.