Help shape the future of CMS PaaS release notes! Take this quick survey and share your feedback.
AI OnAI Off
Help shape the future of CMS PaaS release notes! Take this quick survey and share your feedback.
PropertyCriteriaCollection criterias = new PropertyCriteriaCollection();
PropertyCriteria pubCriteria = new PropertyCriteria();
pubCriteria.Condition = EPiServer.Filters.CompareCondition.Equal;
pubCriteria.Name = "PagePendingPublish";
pubCriteria.Type = PropertyDataType.Boolean;
pubCriteria.Value = true.ToString();
criterias.Add(pubCriteria);
PageDataCollection matches = DataFactory.Instance.FindPagesWithCriteria(
PageReference.StartPage, criterias);
foreach (PageData match in matches)
{
//have to retrieve the unpublished version
PageReference realReference = new PageReference(match.PageLink.ID, true);
PageData unPublishedPageData = GetPage(realReference);
//check any property value here...
}