mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
23 lines
448 B
PHP
23 lines
448 B
PHP
<?php
|
|
/**
|
|
* @package subsites
|
|
*/
|
|
class ControllerSubsites extends Extension
|
|
{
|
|
public function controllerAugmentInit()
|
|
{
|
|
if ($subsite = Subsite::currentSubsite()) {
|
|
if ($theme = $subsite->Theme) {
|
|
SSViewer::set_theme($theme);
|
|
}
|
|
}
|
|
}
|
|
|
|
public function CurrentSubsite()
|
|
{
|
|
if ($subsite = Subsite::currentSubsite()) {
|
|
return $subsite;
|
|
}
|
|
}
|
|
}
|