templatessmarty3smarty-plugins

in smarty version3 I see in folder structure we have 2 plugin directory which should use for create custom plugin function?


see file structure in screenshot atachment Hello Friends,

I see in smarty template version3 two plugin directory.
one into project folder and other into libs. 
In libs folder we have plugins and sysplugins directory. 

My question is I need to create a custom function so I need to put new file into which directory is best way?

Both way working I checked but which is the best way to put custom plugin file in which directory? 

Solution

  • You can put plugins in any directory that has been added to the Smarty plugins_dir, but looking at your screenshot, it appears that the "other" plugins directory you are looking at is part of the demo application included in the Smarty distribution. You should just remove the demo directory entirely and put your plugins in the smarty/libs/plugins directory.