Содержимое файла | Последнее изменение | Открыть журнал | RSS
Редакция | Автор | № строки | Строка |
---|---|---|---|
304 | alex-w | 1 | <?php |
2 | |||
3 | /** |
||
4 | * Smarty method Template_Exists |
||
5 | * |
||
6 | * Checks if a template resource exists |
||
7 | * |
||
8 | * @package Smarty |
||
9 | * @subpackage SmartyMethod |
||
10 | * @author Uwe Tews |
||
11 | */ |
||
12 | |||
13 | /** |
||
14 | * Checks if a template resource exists |
||
15 | */ |
||
16 | |||
17 | /** |
||
18 | * Check if a template resource exists |
||
19 | * |
||
20 | * @param string $resource_name template name |
||
21 | * @return boolean status |
||
22 | */ |
||
23 | function template_exists($smarty, $resource_name) |
||
24 | { |
||
25 | // create template object |
||
26 | $tpl = new $smarty->template_class($resource_name, $smarty); |
||
27 | // check if it does exists |
||
28 | return $tpl->isExisting(); |
||
29 | } |
||
30 | |||
31 | ?> |