Feature Request
| From: | Eric Ocean | Date: | Sat, 26 Apr 2003 11:10:23 +0000 |
| Subject: | Feature Request | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-9389@lists.php.net to get a copy of this message | ||
I feel lame asking for a new feature when Smarty is already so good, but here goes…
Request:
Enhance the config file functionality so that they can be loaded using Smarty's "template resource" paradigm.
Rational:
Although config files are "supposed" to be for global settings (and thus should only require a global directory), I have thought of a number of uses where config files would be nice in a local setting. This is pretty much impossible to do now because even if you use a relative path, that only works relative to the **first** template--all included templates look for their config files relative to the first template, not themselves...
Background:
I've been developing a fairly sophisticated content creation system using Smarty, but it relies heavily on wrapping templates, local PHP includes, and config files (which I can't use right now) together in a "content plugin" type arrangement where you can install a content plugin by just copying a directory, named for the content plugin, which includes all of the sub-directories needed to make the content plugins self-contained (all standard Smarty directories, but local to the plugin). It would be great to be able to use local config files, and override them with user-supplied config files, etc.
Conclusion:
I believe all of these problems could be solved if config files used the "template resource" paradigm from the rest of Smarty.
Thanks for a GREAT templating system!
Eric Ocean