src/Admin/MultisitesCmsMainExtension.php
public function updateEditForm($form) {
        $classNameField = $form->Fields()->dataFieldByName('ClassName');
        if ($classNameField) {
            $className = $classNameField->Value();
            if ($className === 'Site') 
            {
            	$form->Fields()->removeByName(array(SilverStripeNavigator::class));
                $form->removeExtraClass('cms-previewable');
            }
        }
    }
public function updateEditForm($form) {
        $classNameField = $form->Fields()->dataFieldByName('ClassName');
        if ($classNameField) {
            $className = $classNameField->Value();
            if ($className === 'Site') 
            {
            	$form->Fields()->removeByName(array(SilverStripeNavigator::class));
                $form->removeExtraClass('cms-previewable');
            }
        }
    }
public function updateEditForm ( $ form ) { $ classNameField = $ form -> Fields ( ) -> dataFieldByName ( 'ClassName' ) ; if ( $ classNameField ) { $ className = $ classNameField -> Value ( ) ; if ( $ className === 'Site' ) { $ form -> Fields ( ) -> removeByName ( array ( SilverStripeNavigator :: class ) ) ; $ form -> removeExtraClass ( 'cms-previewable' ) ; } } }
If viewing 'Site', disable preview panel.
If viewing Site disable preview panel .