Re: [SMARTY] Using multiple template-directories

From: Date: Tue, 22 Jul 2003 12:24:22 +0000
Subject: Re: [SMARTY] Using multiple template-directories
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9940@lists.php.net to get a copy of this message
On Tue, Jul 22, 2003 at 01:49:29PM +0200, thorte@thorte.org wrote: > Hi, > > I want to use multiple templates for one website and for this purpose I > created one "template_xxx"- and one "template_c_xxx"-directory for each > template. > > In my main-php-file, I assign values to the class-attributes as follows: > > $SMARTY->$template_dir = > $DOCUMENT_ROOT_PATH.$templates['template_directory']; > $SMARTY->$compile_dir = > $DOCUMENT_ROOT_PATH.$templates['template_c_directory']; > $SMARTY->$config_dir = > $DOCUMENT_ROOT_PATH.$templates['template_config_directory']; > $SMARTY->$cache_dir = > $DOCUMENT_ROOT_PATH.$templates['template_cache_directory']; > > e.g. file:/[...]/public_html/project/templates_lr/ > > But this takes no effect, even if I do _not_ assign any values to $SMARTY. > The class always uses the default-values inside the class. But I can't set > new values, nor can I get these values - even though the attributes are > public: > > var $template_dir = 'templates'; // name of directory for > templates > var $compile_dir = 'templates_c'; // name of directory for compiled > templates > > SMARTY always uses the default-values, i.e. "./templates" and > "./templates_c", no matter if I assign different values or not. "$SMARTY->$template_dir" should actually read "$SMARTY->template_dir". HTH messju > ANY IDEA?

« previous php.smarty.general (#9940) next »