Using a default template directory
| From: | Sims, Benjamin | Date: | Thu, 04 Mar 2004 10:05:26 +0000 |
| Subject: | Using a default template directory | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-11048@lists.php.net to get a copy of this message | ||
I would appreciate any ideas on how best to approach the following:
I have several sites running on a same server based around a home-grown CMS
using Smarty. The sites tend to be similar, but occasionally a change is
needed to the template for a particular site. At the moment, I have a folder
for the full set of templates for each site. However, this is a pain if I
want to make a 'global' change.
I have a config file that specifies the templates directory when a page is
loaded, which is then used by the Smarty sub-class constructor. What I would
really like though is to be able to specify both a 'default' and a
'specific' templates directory, such that Smarty would first check for the
template in the specific directory, and if it was not found use the default.
I know that I could do this at the PHP level with a PATH directive, but I
don't want to go this way.
Thanks for any tips,
Benjamin