Checking PageCategory.IsEmpty using PropertyCriteria

I'm trying to write a PropertyCriteria that excludes any pages where the PageCategory property is empty. There is a property that indicates if it is or not

var searchCriteria = new PropertyCriteria
{
    Condition = CompareCondition.Equal,
    Value = locator.ContentTypeRepository().Load

This doesn't work

Any advice? Thanks

#114645
Dec 16, 2014 23:15

The following criteria should work:

var categoryCriteria = new PropertyCriteria
            {
                Name = "PageCategory",
                Type = PropertyDataType.Category,
                Value = CategoryList.LoadCategories().ToString(),
                Required = true,
                IsNull = false
            };

This will include only pages with a category

#114770
Dec 19, 2014 22:09
* 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.