template dir and many files with the same name
| From: | sebab at dialcom dot com dot pl | Date: | Mon, 12 Jan 2004 10:45:54 +0000 |
| Subject: | template dir and many files with the same name | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-10809@lists.php.net to get a copy of this message | ||
Hi all,
I'm making multilingual site and my first idea was to put files in
directory structure like that:
/templates/english/
/templates/russian/
and so on and then in PHP files to set $tpl->template_dir to these
subfolders but $tpl->compile_dir for always to one folder.
And that was bad idea - /english/contact.php and /russian/contact.php
was using the same compiled template file . Do I have to use the same
"root" template dir in whole site? I think so..
Finally I set $tpl->template_dir="...../templates" and then used
templates like that
$tpl->display("english/contact.tpl");
instead of
$tpl->display("contact.tpl");
Anybody else encountered that?
Greetings!
SeBa