Re: different template paths
| From: | Marc Logemann | Date: | Thu, 19 Jul 2001 17:13:09 +0000 |
| Subject: | Re: different template paths | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-1215@lists.php.net to get a copy of this message | ||
Hi,
yeah, would be a change of some impact. But performance shouldnt be a problem
there. You could for example stop searching if you hit a file that match in
one of the template dirs. So other dirs wouldnt be searched...
IMO there shouldnt be the need to define so much directories, cant see reasons
for declaring more than 2-3 dirs. Because there is allways the chance to
modify the searchpath, so you must only have as much dirs in the search path
as you need in one "script"...
Right now i have ugly things like
{inlcude file="$someotherpaththanactual/whatever.tpl"}
i really dont like the $someother... var there :)
> An idea... how about supporting a search path in the $template_dir
> variable:
> $template_dir = "./templates:./template2:/some/other/dir";
> This is a significant change though, because now the parser must check
> for the existance of the template before displaying it, and check each
> path sequentially. I'm not sure how this would affect other things. And,
> would we want to support this in $config_dir and maybe other places?
morelogs | Marc Logemann, CTO
____________________________________________________________
Rellinghauser Str. 332 · D-45136 Essen · Germany
T: +49 201 84 188-177 · F: +49 201 84 188-199
mlogemann@morelogs.de · http://www.morelogs.de