1 <?php
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 */
13 /**
14 * Checks if a template resource exists
15 */
17 /**
18 * Check if a template resource exists
19 *
20 * @param string $resource_name template name
21 * @return boolean status
22 */
23 function Smarty_Method_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 }
31 ?>