I'm trying to get pages in a site that match a specific urlsegment but when I use the code below it's returning all the pages in the site.
var criterias = new PropertyCriteriaCollection();
var urlCriteria = new PropertyCriteria
Condition = CompareCondition.Contained,
Name = "PageURLSegment",
Value = "test-page",
Type = PropertyDataType.String,
Required = true
PageDataCollection pages = DataFactory.Instance.FindPagesWithCriteria(PageReference.RootPage, criterias);Anyone any idea what I'm doing wrong??
It's a known issue in EPiServer which has already been fixed and hopefully will be shipped with R2 release of CMS-6.
Bug# 56836: PageURLSegment ignroed by FindPagesWithCriteria.