Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
Hello,
I have the following structure:
class BasePage : PageData {}
class A : BasePage {}
class B : BasePage {}
and some other classes who inherit from this BasePage.
Now I need to retreive all the pages based on the BasePage type how can I do that except by queriing the tree recursively?
I have try
var collection = new PropertyCriteriaCollection
{
new PropertyCriteria
{
Required = true,
Name = "PageTypeName",
Condition = CompareCondition.Equal,
Type = PropertyDataType.PageType,
Value = "BasePage"
}
};
var queryService = ServiceLocator.Current.GetInstance<IPageCriteriaQueryService>();
return queryService.FindPagesWithCriteria(ContentReference.RootPage, collection);
But it doesn't seem to work.
Regards,
Benjamin