diff --git a/_config.php b/_config.php index b8ed4f2..3b471c7 100644 --- a/_config.php +++ b/_config.php @@ -14,4 +14,14 @@ Object::add_extension('LeftAndMain', 'ControllerSubsites'); Object::add_extension('Group', 'GroupSubsites'); Object::add_extension('File', 'FileSubsites'); -?> + +// Backwards compatibility with SilverStripe 2.2 +if(!class_exists('CMSMenu')) { + Director::addRules(100, array( + 'admin/subsites/$Action/$ID/$OtherID' => 'SubsiteAdmin', + )); + Object::addStaticVars( 'LeftAndMain', array( 'extra_menu_items' => array( + 'Sub-sites' => array("intranets", "admin/subsites/", 'SubsiteAdmin') + ))); +} +?> \ No newline at end of file