|
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 |
bimal Smarty Elite
Joined: 19 Apr 2007 Posts: 423
|
Posted: Mon Jan 26, 2009 3:57 pm Post subject: Portable configuration tip - for plugins |
|
|
Smarty can support your plugins in a different directory.
Here is my trick in its configuration file:
Code: | $smarty = new Smarty();
$smarty->template_dir = 'smarty_templates';
$smarty->compile_dir = 'smarty_compiles';
$smarty->cache_dir = 'smarty_cache';
$smarty->config_dir = 'smarty_configs';
$smarty->plugins_dir[] = 'smarty_plugins'; |
Please note that plugins_dir[] will preserve the Original Smarty Plugins directory that comes with a lot of files and is self defined in its internal configuration. By adding plugins_dir[], you have a chance of putting your own smarty plugins into a separate directory. It helps to isolate your smarty's internal plugins and your application specific plugins.
Other settings are what I use for myself. You may use smarty's default configurations.
What is the benefit then?
Smarty though slowly, is keeping upgrading its various files.
If you write your own plugins into a different directory, you can blindly upgrade your smarty in the future, or whenever you like it. |
|
Back to top |
|
ntesic Smarty n00b
Joined: 07 Oct 2009 Posts: 3
|
Posted: Wed Oct 07, 2009 9:10 am Post subject: |
|
|
Nice |
|
Back to top |
|
realistic Smarty n00b
Joined: 10 Oct 2009 Posts: 1
|
|
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
|