I have a ContentArea wrapped in some HTML that should not be visible if none of the Content inside is visible for the user.
@Html.PropertyFor(m => m.MyContentArea)
Though ContentArea.FilteredFragments does not seem to consider whether the Content is published or not, only on SecurityDescriptors and Visitor Groups.
When adding a Page that is still not published in an empty ContentArea, CurrentPage.MyContentArea.FilteredFragments.Count() returns 1, meaning an IF-statement CurrentPage.MyContentArea.FilteredFragments.Count() > 0 or CurrentPage.MyContentArea.FilteredFragments.Any() is useless unless I manually filter unpublished Content.
Hence the HTML wrapping my ContentArea will be visible but my Page from the ContentArea is not due to its publish state.
Is this a bug or is it supposed to work this way? Is there any other way to get