| Recommend this page to a friend! |
| Packages of Michael Beck | Xoops 2.5 | htdocs/xoops_lib/vendor/smarty/smarty/docs/designers/config-files.md | Download |
|
|||||||||||||||||||||
Config FilesConfig files are handy for designers to manage global template variables from one file. One example is template colors. Normally if you wanted to change the color scheme of an application, you would have to go through each and every template file and change the colors. With a config file, the colors can be kept in one place, and only one file needs to be updated.
Values of config file variables can be in
quotes, but not necessary. You can use either single or double quotes.
If you have a value that spans more than one line, enclose the entire
value with triple quotes \("""\). You can put comments into config
files by any syntax that is not a valid config file syntax. We recommend
using a The example config file above has two sections. Section names are
enclosed in \[brackets\]. Section names can be arbitrary strings not
containing Config files are loaded into templates with the built-in template
function You can hide variables or entire sections by prepending the variable
name or section name with a period(.) eg Config files (or resources) are loaded by the same resource facilities
as templates. That means that a config file can also be loaded from a db
See also |