diff options
| author | Simon Wisselink <wisskid@users.noreply.github.com> | 2024-05-29 15:32:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-29 15:32:47 +0200 |
| commit | 2a87c65994811a1eb26a59f58ecbf663445e8739 (patch) | |
| tree | 6636c14411902e19515de1e2b455eb968944e34c /docs | |
| parent | cdee97d3f1dff597be8583625adb42710da2c885 (diff) | |
| download | smarty-2a87c65994811a1eb26a59f58ecbf663445e8739.tar.gz smarty-2a87c65994811a1eb26a59f58ecbf663445e8739.tar.bz2 smarty-2a87c65994811a1eb26a59f58ecbf663445e8739.zip | |
implemented and documented prependTemplateDir. (#1025)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api/configuring.md | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/docs/api/configuring.md b/docs/api/configuring.md index 4c1c91fa..ee2ebf7e 100644 --- a/docs/api/configuring.md +++ b/docs/api/configuring.md @@ -12,24 +12,27 @@ Use `getTemplateDir()` to retrieve the configured paths. <?php // set a single directory where the config files are stored -$smarty->setTemplateDir('./config'); +$smarty->setTemplateDir('./templates'); -// set multiple directories where config files are stored -$smarty->setTemplateDir(['./config', './config_2', './config_3']); +// set multiple directories where templates are stored +$smarty->setTemplateDir(['./templates', './templates_2', './templates_3']); -// add directory where config files are stored to the current list of dirs -$smarty->addTemplateDir('./config_1'); +// add directory where templates files are stored to the current list of dirs +$smarty->addTemplateDir('./templates_1'); // add multiple directories to the current list of dirs $smarty->addTemplateDir([ - './config_2', - './config_3', + './templates_2', + './templates_3', ]); // chaining of method calls -$smarty->setTemplateDir('./config') - ->addTemplateDir('./config_1') - ->addTemplateDir('./config_2'); +$smarty->setTemplateDir('./templates') + ->addTemplateDir('./templates_1') + ->addTemplateDir('./templates_2'); + +// insert a template dir before exising template dirs +$smarty->prependTemplateDir('./more_important_templates') // get all directories where config files are stored $template_dirs = $smarty->getTemplateDir(); |
