ENHANCEMENT: Do not display SilverStripeNavigator_CMSLink when in a LeftAndMain extension not just CMSMain extensions

This commit is contained in:
UndefinedOffset 2013-02-01 14:16:19 -04:00
parent 74a44933b2
commit 119d8aa892

View File

@ -196,12 +196,12 @@ class SilverStripeNavigatorItem_CMSLink extends SilverStripeNavigatorItem {
}
public function isActive() {
return (Controller::curr() instanceof CMSMain);
return (Controller::curr() instanceof LeftAndMain);
}
public function canView($member = null) {
// Don't show in CMS
return !(Controller::curr() instanceof CMSMain);
return !(Controller::curr() instanceof LeftAndMain);
}
}