RE: Config vars
| From: | Monte Ohrt | Date: | Fri, 14 Dec 2001 16:02:41 +0000 |
| Subject: | RE: Config vars | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2304@lists.php.net to get a copy of this message | ||
You shouldn't use these defaults anyways. In your application, make an
extention of the class and set them there. Then you don't have to touch
the class files when you update them.
myapp_setup.php
---------------
class My_Smarty extends Smarty {
$this->template_dir = './my/path/to/templates';
$this->compile_dir = './my/path/to/templates_c';
$this->config_dir = './my/path/to/configs';
}
index.php
---------
include 'myapp_setup.php';
$smarty = new My_Smarty;
$smarty->display('index.tpl');
LIMBOURG Arnaud wrote:
>
> > What do you mean? What are you updating?
>
> I mean
>
> var $template_dir = 'xxx'; // name of directory for templates
> var $compile_dir = 'xxx'; // name of directory for compiled
> templates
> var $config_dir = 'xxxx'; // directory where config files
> are located
>
> in smarty class
>
> ---
> 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/