November Happy Hour will be moved to Thursday December 5th.

Searching for Pages Based on Page Type

Vote:
 
PropertyCriteria criteria = new PropertyCriteria();
criteria.Condition = CompareCondition.Equal;
criteria.Name = "PageTypeID";
criteria.Type = PropertyDataType.PageType;
criteria.Value = Locate.ContentTypeRepository().Load("PageTypeNewsItem").ID.ToString();
criteria.Required = true;

http://sdkbeta.episerver.com/SDK-html-Container/?path=/SdkDocuments/CMS/7/Knowledge%20Base/Developer%20Guide/Search/Search%20for%20pages%20based%20on%20page%20type%20property.htm&vppRoot=/SdkDocuments//CMS/7/Knowledge%20Base/Developer%20Guide/

Is there a non-magic-string way for the criteria.Value row?

#64875
Jan 14, 2013 14: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.