Re: Other directories and Smarty
| From: | Monte Ohrt | Date: | Thu, 22 Feb 2001 15:19:34 +0000 |
| Subject: | Re: Other directories and Smarty | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-192@lists.php.net to get a copy of this message | ||
Maybe I'm missing something here (it's early), but then how would
they include a template from another directory from within the
application template?
Joris Trooster / Interstroom wrote:
>
> > 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.
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/