/** * Restores the application path after template is rendered. */ protected function renderCleanup() { parent::renderCleanup(); if (isset($this->currentPath)) { CurrentPath::set($this->oldAppPath); } }