Last active
April 13, 2021 07:25
-
-
Save jondjones/5bcd2fac317f3baac882904080f21725 to your computer and use it in GitHub Desktop.
How To Get A List Of Scheduled Pages Within Umbraco 8 - 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var results = SearchByIndex("TutorialIndex"); | |
using (var umbracoContextReference = _umbracoContextFactory.EnsureUmbracoContext()) | |
{ | |
foreach (var result in results) | |
{ | |
var contentPage = _contentService.GetById(Convert.ToInt32(result.Id)); | |
if (contentPage == null) | |
{ | |
continue; | |
} | |
var scheduledData = contentPage.ContentSchedule?.FullSchedule?.FirstOrDefault()?.Date; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment