Re: Other directories and Smarty
| From: | Joris Trooster / Interstroom | Date: | Thu, 22 Feb 2001 14:33:34 +0000 |
| Subject: | Re: Other directories and Smarty | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-189@lists.php.net to get a copy of this message | ||
> 2. I would like to be able to share these tempaltes, via an include
> statement, but it will not work as I cannot point Smarty to use another
> template dir
You can inherit the Smarty class, and change the desired variables :
class Common_Smarty extends Smarty {
var $template_dir = "/path/to/common/templates";
var $compile_dir = "/path/to/common/templates_c";
}
Now use template = new Common_Smarty; for the common templates.
Joris.