
Comparing changes: https://github.com/smarty-php/smarty/compare/v4.3.1...v4.4.1 It is noticeable that Smarty 4.3.1 does not officially support PHP 8.3. Is only supported with 4.4.0. Remark: During tests with Smarty 4.5.1, it was noticed that the following warning occurs: Deprecated: Using the unregistered function "function_exists" in a template is deprecated and will be removed in a future version. Use Smarty::registerPlugin to explicitly register a custom modifier. As of Smarty 5.X.X, templates must be revised again. The Smarty release 5.0.2 is already officially available. However, integration into FlatPress is not entirely trivial.
37 lines
1.3 KiB
Markdown
37 lines
1.3 KiB
Markdown
\$template\_dir {#variable.template.dir}
|
|
===============
|
|
|
|
This is the name of the default template directory. If you do not supply
|
|
a resource type when including files, they will be found here. By
|
|
default this is `./templates`, meaning that Smarty will look for the
|
|
`templates/` directory in the same directory as the executing php
|
|
script. \$template\_dir can also be an array of directory paths: Smarty
|
|
will traverse the directories and stop on the first matching template
|
|
found.
|
|
|
|
> **Note**
|
|
>
|
|
> It is not recommended to put this directory under the web server
|
|
> document root.
|
|
|
|
> **Note**
|
|
>
|
|
> If the directories known to `$template_dir` are relative to
|
|
> directories known to the
|
|
> [include\_path](https://www.php.net/ini.core.php#ini.include-path) you
|
|
> need to activate the [`$use_include_path`](#variable.use.include.path)
|
|
> option.
|
|
|
|
> **Note**
|
|
>
|
|
> As of Smarty 3.1 the attribute \$template\_dir is no longer accessible
|
|
> directly. Use [`getTemplateDir()`](#api.get.template.dir),
|
|
> [`setTemplateDir()`](#api.set.template.dir) and
|
|
> [`addTemplateDir()`](#api.add.template.dir) instead.
|
|
|
|
See also [`Template Resources`](#resources),
|
|
[`$use_include_path`](#variable.use.include.path),
|
|
[`getTemplateDir()`](#api.get.template.dir),
|
|
[`setTemplateDir()`](#api.set.template.dir) and
|
|
[`addTemplateDir()`](#api.add.template.dir).
|