diff options
Diffstat (limited to 'public/admin/controller/event/theme.php')
-rw-r--r-- | public/admin/controller/event/theme.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/public/admin/controller/event/theme.php b/public/admin/controller/event/theme.php new file mode 100644 index 0000000..3148f13 --- /dev/null +++ b/public/admin/controller/event/theme.php @@ -0,0 +1,15 @@ +<?php +class ControllerEventTheme extends Controller { + public function index(&$route, &$args) { + // This is only here for compatibility with old templates + if (substr($route, -3) == 'tpl') { + $view = substr($route, 0, -3); + } + + if (is_file(DIR_TEMPLATE . $route . '.twig')) { + $this->config->set('template_engine', 'twig'); + } elseif (is_file(DIR_TEMPLATE . $route . '.tpl')) { + $this->config->set('template_engine', 'template'); + } + } +} |