SaaS CMS has officially launched! Learn more now.

FindPagesWithCriteria with UrlSegment



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??
Dec 23, 2010 16:25


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.


Dec 23, 2010 17:07
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.