Re: templates_dir : a better way ?
| From: | Jimmy Harlindong | Date: | Mon, 25 Mar 2002 11:06:41 +0000 |
| Subject: | Re: templates_dir : a better way ? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3319@lists.php.net to get a copy of this message | ||
Here is what I do:
$smarty->templates_dir = '/home/jimmy/smarty/templates';
inside the /home/jimmy/smarty/templates directory:
I put top level templates here
then under this directory I create other directories
/support
/shop
/chat
/business
/blah
then in my php:
$smarty->display('welcome.tpl'); // this will use the main smarty
templates dir
$smarty->display('support/index.tpl');
$smarty->display('shop/index.tpl');
and so on
I would very much prefer smarty not to do automatically "search" through
my sub directories as I would like to specify exactly which template to
display on which directory.
Cheers