Re: Variable template directories.

From: Date: Thu, 07 Mar 2002 15:23:17 +0000
Subject: Re: Variable template directories.
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2971@lists.php.net to get a copy of this message
On Thu, Mar 07, 2002 at 08:22:35AM -0600, Monte Ohrt wrote: > I don't see a reason to do this, you can accomplish the same thing (or > basically anything you want) with a custom resource function. > > {include file="theme:$theme_dir:$template"} True, for simple things like this. I use some more 'magic' that has a fallback for templates by the same name that don't need to be different in that particular theme. Furthermore I use not only themes, but the layout also can different depending from which site you are reaching that page (syndication). Now that leaves up to six different locations for a template called by the same name. I don't want to have such logic inside my templates to bother my editors with. As long as they put the template in the right directory, everything works fine. I've tried using the custom resource function for this, but if you wanted to leave out variables like theme, external_party, etc., because of the way compiled templates are stored, for each different combination, a new compile has to be done. Hmm, that might be not so clear. I hope you get my point. > > Monte Ralphm

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