mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
MINOR If we're loading a page and it's not on the same subsite, switch to that subsite. (from r87898) (from r96284)
This commit is contained in:
parent
d6faa5450d
commit
6a3e0c0817
@ -13,6 +13,12 @@ class LeftAndMainSubsites extends Extension {
|
||||
Requirements::css('subsites/css/LeftAndMain_Subsites.css');
|
||||
Requirements::javascript('subsites/javascript/LeftAndMain_Subsites.js');
|
||||
Requirements::javascript('subsites/javascript/VirtualPage_Subsites.js');
|
||||
|
||||
if ($currentPage = $this->owner->currentPage()) {
|
||||
if (Subsite::currentSubsiteID() != $currentPage->SubsiteID) {
|
||||
Subsite::changeSubsite($currentPage->SubsiteID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user