FindPagesWithCriteria with UrlSegment

Vote:
 

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

Hi,

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.

 

#46679
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.