Index: branches/5.2.x/core/kernel/application.php =================================================================== diff -u -N -r16339 -r16348 --- branches/5.2.x/core/kernel/application.php (.../application.php) (revision 16339) +++ branches/5.2.x/core/kernel/application.php (.../application.php) (revision 16348) @@ -1,6 +1,6 @@ InitParser(); + /** @var kThemesHelper $themes_helper */ + $themes_helper = $this->recallObject('ThemesHelper'); + // Set Web Request variables to affect link building on template itself. + $this->SetVar('t', $template); + $this->SetVar('m_cat_id', $themes_helper->getPageByTemplate($template)); + $this->SetVar('passed', 'm'); + + // Replace current page content with given template. + $this->InitParser(); $this->Parser->Clear(); - $this->HTML = $this->Parser->Run($this->GetVar('t')); + $this->HTML = $this->Parser->Run($template); } /**