aboutsummaryrefslogtreecommitdiffstats
path: root/util/precompile_smarty3.php
blob: 10b2eadb6bced535321f1ce8eb169417dc125358 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

/**
* @package util
*/

require_once('boot.php');
require_once('vendor/smarty/smarty/libs/Smarty.class.php');

$folders = array_merge(array('view/tpl/'), glob('view/theme/*/tpl/*', GLOB_ONLYDIR));

$s = new Smarty();

$s->setTemplateDir($folders);

$s->setCompileDir(TEMPLATE_BUILD_PATH . '/compiled/');
$s->setConfigDir(TEMPLATE_BUILD_PATH . '/config/');
$s->setCacheDir(TEMPLATE_BUILD_PATH . '/cache/');

$s->left_delimiter = '{{';
$s->right_delimiter = '}}';

$s->compileAllTemplates('.tpl', true);