What is Smarty?
Why use it?
Use Cases and Work Flow
Syntax Comparison
Template Inheritance
Best Practices
Crash Course
You may use the Smarty logo according to the trademark notice.
For sponsorship, advertising, news or other inquiries, contact us at:
addPluginsDir() — add a directory to the list of directories where plugins are stored
Smarty addPluginsDir(string|array plugins_dir);
Example 14.2. addPluginsDir()
<?php // add directory where plugins are stored $smarty->addPluginsDir('./plugins_1'); // add multiple directories where plugins are stored $smarty->setPluginsDir(array( './plugins_2', './plugins_3', )); // view the plugins dir chain var_dump($smarty->getPluginsDir()); // chaining of method calls $smarty->setPluginsDir('./plugins') ->addPluginsDir('./plugins_1') ->addPluginsDir('./plugins_2'); ?>
See also
getPluginsDir()
,
setPluginsDir()
and
$plugins_dir
.