EIOS/integration/inc/class_smarty.php

24 lines
836 B
PHP

<?php
require('inc/smarty/Smarty.class.php');
class class_smarty extends Smarty{
function config($TPL){
$smarty = new Smarty;
$smarty->template_dir = $TPL.'/';
$smarty->compile_dir = $TPL.'/templates_c/';
$smarty->config_dir = $TPL.'/configs/';
$smarty->cache_dir = $TPL.'/cache/';
//$smarty->force_compile = true;
$smarty->debugging = false;
$smarty->caching = false;
$smarty->cache_lifetime = 1;
// очищаем все файлы кэша
$smarty->clearAllCache();
//очищаем все скомпилированные страницы
$smarty->clearCompiledTemplate();
// очищаем только кэш шаблона index.tpl
//$smarty->clear_cache('index.tpl');
return $smarty;
}
}
?>