Re: different template paths

From: Date: Tue, 17 Jul 2001 15:00:38 +0000
Subject: Re: different template paths
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1183@lists.php.net to get a copy of this message
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. Greetz, Ralphm On Tue, Jul 17, 2001 at 08:22:50AM -0500, Monte Ohrt wrote: > Use the full path to the included templates, or you could pass your > template path in an assigned variable: > > assign("moda","/path/to/Module_A"); > assign("modb","/path/to/Module_B"); > > > {include file="$moda/index.tpl"} > {include file="$modb/index.tpl"} > > > 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"}

« previous php.smarty.general (#1183) next »