|
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 |
wvdploeg Smarty Rookie
Joined: 05 Aug 2003 Posts: 19
|
Posted: Fri Sep 26, 2003 6:20 pm Post subject: Multiple plugin directories ? |
|
|
Is it possible to config multiple plugin directories ? I want to seperate my own plugins from the Smarty 'native' plugins, without having to register each function... is it possible in some way ? |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Fri Sep 26, 2003 8:45 pm Post subject: |
|
|
Use an array of paths instead of a simple path and you are set. Be warned that plugin searches will scan each path (in order given) until the plugin is found. Thus, you want to put your most frequently used plugin dir first in the array. |
|
Back to top |
|
wvdploeg Smarty Rookie
Joined: 05 Aug 2003 Posts: 19
|
Posted: Sat Sep 27, 2003 7:50 pm Post subject: |
|
|
Just curious, is this an undocumented feature, or did I just overlook it in the docs
And does this apply to all paths (template path, configs path etc) for Smarty |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Sun Sep 28, 2003 12:21 am Post subject: |
|
|
I don't think this has gotten into the docs yet. Without scouring the code or docs to double check, I can say that the *_dir settings take arrays where it "makes sense" . For example, templates_dir accepts arrays (multiple read paths) but templates_c does not (single write path). |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Sun Sep 28, 2003 6:55 am Post subject: |
|
|
for $smarty->plugins_dir this is supported but missing in the docs.
for $smarty->template_dir it works but is not supported (so don't rely on it).
for $smarty->compile_dir i don't know, but i think only a single directory is supported here. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Sun Sep 28, 2003 9:07 am Post subject: |
|
|
messju wrote: | $smarty->template_dir it works but is not supported (so don't rely on it). |
really? I was not aware of that, thanks! I suppose resources are a more general way of dealing with situations where you would want multiple dirs, yes? |
|
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
|