PHP Classes

File: htdocs/xoops_lib/vendor/smarty/smarty/docs/programmers/api-variables/variable-template-dir.md

Recommend this page to a friend!
  Packages of Michael Beck   Xoops 2.5   htdocs/xoops_lib/vendor/smarty/smarty/docs/programmers/api-variables/variable-template-dir.md   Download  
File: htdocs/xoops_lib/vendor/smarty/smarty/docs/programmers/api-variables/variable-template-dir.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: Xoops 2.5
Modular content management publication system
Author: By
Last change:
Date: 2 months ago
Size: 1,326 bytes
 

Contents

Class file image Download

\$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 you > need to activate the $use_include_path > option.

> Note > > As of Smarty 3.1 the attribute \$template\_dir is no longer accessible > directly. Use getTemplateDir(), > setTemplateDir() and > addTemplateDir() instead.

See also Template Resources, $use_include_path, getTemplateDir(), setTemplateDir() and addTemplateDir().