I've recently taken over a project that was developed by a third party company.  The site uses a number of hub/stack pages to pull in child pages to make up the page content to automatically create page placeholders from a side nav.  We had an issue where content editors could not fully preview a stack page correctly if some of the subpages hadn't been published. I had to change the template to allow editors to view unpublished data in the preview.  The first part was finding out if the current request was being made via the editor or from the website, this was done by checking if the SystemPageBase type had been populated (In edit mode it will be false):

The next step was getting all child pages for a stack page, regardless of published status.  After some Googling, I found an article that demo'ed how to get all unpublished child pages

However, when you call this method if a page is unpublished, not all the properties in PageData are correctly populated. From the Episerver forum, this looks like a known bug.  TO overcome the issue you have to re-iterate over your data to get the latest version. See code below :