List pages using a specific template

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
Jun 15, 2005 17:13
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);
Jun 16, 2005 18:46
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.