Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Searching for pages with certain properties

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
Jun 06, 2006 17:28
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!
Jul 07, 2006 1:39
* 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.