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
};
criterias.Add(urlCriteria);
PageDataCollection pages = DataFactory.Instance.FindPagesWithCriteria(PageReference.RootPage, criterias);
Hi,
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 }; criterias.Add(urlCriteria); PageDataCollection pages = DataFactory.Instance.FindPagesWithCriteria(PageReference.RootPage, criterias);
Anyone any idea what I'm doing wrong??