Hi, in project we have an issue where it is not immediately obvious if a page is viewable only by logged in users (without going into the Access tab) and this is causing problems for the client. I want to be able to add a literal field on the main tab, saying something like "this page is not publicly viewable..etc etc'. I want to do something like:
if(($this->CanViewType == 'OnlyTheseUsers') || ($this->CanViewType == 'LoggedInUsers')) {
$f->addFieldToTab( 'Root.Content.Main', new LiteralField('info1','This page is restricted (not publicly viewable) - change this behaviour on the Access tab'),'Title');
}
This works kinda ok, but since most pages underneath a secure section have a CanViewType = inherit it fails on those pages....
Are there any magic methods, or easier way to do this?