London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

List pages using a specific template

Vote:
0
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:
0
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:
0
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.