silverstripe-subsites/code/extensions
James Cocker 47df87f62c Fixes #135: LeftAndMain switching between subsites
When trying to switch to a different subsite from a page's editing view, it wouldn't switch. This was partly due to a $record always existing due to the homepage fallback on currentPageID : https://github.com/silverstripe/silverstripe-cms/blob/3.1/code/controllers/CMSMain.php#L816

So as currentPage() couldn't actually be used to test for the existance of a current page, I've added in a check for isset($this->owner->urlParams['ID']).

I've also moved the check for $_GET['SubsiteID’] which indicated a forced subsite switch (eg. via the dropdown switcher) above the check for a current page, as it should take precedence, and it wasn't being run when both conditions matched causing the subsite not to change.

Tested changing subsites from /admin/pages, from page edit view, from a page edit URL, and from other CMS sections such as Files and Security, and all seems to be working perfectly now.
2014-06-04 16:41:28 +01:00
..
CMSPageAddControllerExtension.php BUG Fixing "Add new" not adding the page to the correct subsite 2013-05-28 12:17:16 +12:00
ControllerSubsites.php BUG: Modifying the module to work with SS 3.0 2012-07-16 11:18:38 +12:00
ErrorPageSubsite.php Extension and config fixes for 3.1 2013-04-04 15:10:22 +13:00
FileSubsites.php BUGFIX: permissions to check the ‘CMS_ACCESS_LeftAndMain’ global permission. 2014-01-10 09:31:44 +13:00
GroupSubsites.php More globalisation 2013-10-30 13:44:06 +01:00
LeftAndMainSubsites.php Fixes #135: LeftAndMain switching between subsites 2014-06-04 16:41:28 +01:00
SiteConfigSubsites.php BUG: Subsite save SiteConfig overwrites MainSite SiteConfig (Issue #15) 2013-05-24 16:26:57 +12:00
SiteTreeSubsites.php Make canEdit fall back to session if the object's SubsiteID not there. 2014-01-10 09:58:53 +13:00
SubsiteMenuExtension.php API: Subsite support for menu of cms (hide admins that don't declare support) (fixes #101 and #89 ) 2013-08-22 13:02:46 +12:00