Our pages contain a content area that contains a number of blocks, which are then rendered in a list by looping through ContentArea.FilteredItems.
When the blocks are all published, this seems to work fine, but when a block is not published, the contents are not shown when viewing the page, even when in On Page Edit mode.
I thought perhaps this was just some oddity with the way ContentArea.FilteredItems works, so I tried to adjust the template so that it looked at PageEditing.PageIsInEditMode, and if true, instead of looping through ContentArea.FilteredItems, loop over ContentArea.Items instead.
However, when testing this, it appears that even though PageEditing.PageIsInEditMode is correctly identified, both ContentArea.Items and ContentArea.FilteredItems are returning the same result. For example, if I have 2 published blocks and 1 unpublished block in a content area, then both ContentArea.Items and ContentArea.FilteredItems return 2 items, rather than 3. There appears to be no way to retrieve the list of all blocks.
Additionally, if I create a page and add a block to it and publish that block, then go in and edit the block but do not publish, when I preview the page I do not see the unpublished edits, but rather the originally published block, until I republish the block. If I edit a page directly and don't publish the results, I still see the unpublished changes when viewing the page in edit mode, so this doesn't seem to make any sense that blocks work differently.
How can I set this up so that the unpublished blocks can be viewed in Edit Mode, so that authors can validate their work prior to publishing? Is there a bug here somewhere? Do I have something misconfigured?
Thanks!