|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mankyd Smarty Regular
Joined: 04 May 2006 Posts: 92 Location: Boston MA
|
Posted: Sat Jan 26, 2008 4:57 am Post subject: Ignore Non-Existing Tags (or make non-fatal) |
|
|
I am wondering if you could add a flag to the Smarty class that makes it ignore non-existing plugins/tags. I am sure something like this has been suggested before. I found one similar post: http://www.phpinsider.com/smarty-forum/viewtopic.php?t=4190
I am writing a framework of sorts that contains it's own plugin system. Some of those plugins define Smarty plugins. Those Smarty plugins are used in some of the installed templates. If a user disables one of the installed framework plugins (say the comment plugin) the templates immediately start failing because they no longer have all of the necessary Smarty plugins defined.
I don't want my users to have to go and manually edit their templates just because they've disabled or uninstalled a plugin. In my framework, disabling a plugin is as simple as clicking a button. Editing a template, of course, requires firing up a text editor of some sort and finding everywhere the plugins are referenced - much more work.
Ideally, modifier, function, and insert plugins would all be ignored. Block plugins would have everything between its start and end tags stripped out. This functionality would of course have to be enabled via a flag, say $smarty->surpress_plugin_errors or something similar.
Thoughts? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|