Using multiple template-directories
| From: | thorte at thorte dot org | Date: | Tue, 22 Jul 2003 11:49:29 +0000 |
| Subject: | Using multiple template-directories | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-9939@lists.php.net to get a copy of this message | ||
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.
ANY IDEA?