owner->ClassName, 'static_filepath'); $subdomainPart = ""; // when there's a controller get it subsite from session if (Controller::has_curr()) $subsite = Subsite::currentSubsite(false); // since this function is called from Page class before the controller is created, we have to get subsite from domain instead else { $subsiteID = Subsite::getSubsiteIDForDomain(); if($subsiteID != 0) $subsite = DataObject::get_by_id("Subsite", $subsiteID); else $subsite = null; } if($subsite) { $subdomain = $subsite->domain(); $subdomainPart = "-{$subdomain}"; } if(singleton('SiteTree')->hasExtension('Translatable') && $locale && $locale != Translatable::default_locale()) { $filepath = $static_filepath . "/error-{$statusCode}-{$locale}{$subdomainPart}.html"; } else { $filepath = $static_filepath . "/error-{$statusCode}{$subdomainPart}.html"; } return $filepath; } }