get($this->owner->ClassName, 'static_filepath'); $subdomainPart = ''; // Try to get current subsite from session $subsite = Subsite::currentSubsite(); // since this function is called from Page class before the controller is created, we have // to get subsite from domain instead if (!$subsite) { $subsiteID = Subsite::getSubsiteIDForDomain(); if ($subsiteID != 0) { $subsite = DataObject::get_by_id(Subsite::class, $subsiteID); } else { $subsite = null; } } if ($subsite) { $subdomain = $subsite->domain(); $subdomainPart = "-{$subdomain}"; } // @todo implement Translatable namespace if (singleton(SiteTree::class)->hasExtension('Translatable') && $locale && $locale != Translatable::default_locale() ) { $filepath = $static_filepath . "/error-{$statusCode}-{$locale}{$subdomainPart}.html"; } else { $filepath = $static_filepath . "/error-{$statusCode}{$subdomainPart}.html"; } $name = $filepath; } }