aboutsummaryrefslogtreecommitdiffstats
path: root/public/admin/controller/event/theme.php
blob: 3148f13296769782e519cdb09d81638aa7ea6dc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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');
		}		
	}
}