Re: different template paths
| From: | Marc Logemann | Date: | Thu, 19 Jul 2001 11:23:29 +0000 |
| Subject: | Re: different template paths | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-1198@lists.php.net to get a copy of this message | ||
Hi,
i dont think that would help, the thing is, we need a search-path,
and this search path could be an array of several template path.
Of course you can overide the actual template path, for different
scripts, but the include() problem still exists, because you cant
overide the template path within the parsing of a document.
I like the idea of Monte below....
> What about a search path (first one found is used) or better yet:
> a user overridable method for resolving the actual loaded filename based
> on a given (base-)filename? With the latter method you could write your
> own
> magic to find the actual templates.
>> I've also tossed around the idea of allowing $template_dir to be an
>> associative array, to assign multiple template resources:
>>
>> $template_dir = array(
>> "moda","/path/to/module_A",
>> "modb","/path/to/module_B",
>> "gen","/path/to/General");
>>
>>
>> {include path="moda:index.tpl"}
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