Searching for pages with certain properties

Vote:
 
Hi, I have a custom property that exists on certain pages. I want to get a PageCollection of these pages that have this property (property is called "Placement"). How can I use the FindPagesWithCriteria function to get such a page collection ? I've tried, but without success. myCriteria = new PropertyCriteria(); myCriteria.Name = "Placement"; myCriteria.IsNull = false; PropertyCriteriaCollection col = new PropertyCriteriaCollection(); col.Add(myCriteria); PageDataCollection colPages = Global.EPDataFactory.FindPagesWithCriteria ( Global.EPConfig.StartPage, col); Thanks Danie
#12666
Mar 25, 2008 18:35
Vote:
 
Just a guess, but you have not specified the PropertyType... i.e myCriteria.Type = EPiServer.Core.PropertyDataType.String; Assuming this is a string, of course!
#14711
Mar 25, 2008 18:45
* 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.