| Recommend this page to a friend! |
| Packages of Michael Beck | Xoops 2.5 | htdocs/xoops_lib/vendor/smarty/smarty/docs/designers/language-custom-functions/language-function-eval.md | Download |
|
|||||||||||||||||||||
{eval}
Attributes| Attribute Name | Required | Description | |----------------|----------|------------------------------------------------------| | var | Yes | Variable (or string) to evaluate | | assign | No | The template variable the output will be assigned to | If you supply the > Note
>
> - Evaluated variables are treated the same as templates. They follow
> the same escapement and security features just as if they were
> templates.
>
> - Evaluated variables are compiled on every invocation, the compiled
> versions are not saved! However, if you have caching
> enabled, the output will be cached with the rest of the template.
>
> - If the content to evaluate doesn't change often, or is used
> repeatedly, consider using
> ExamplesThe contents of the config file,
Where the template is: The above template will output:
This outputs the server name (in uppercase) and IP. The assigned
variable
Where the template is: |