From 20fee78cf15446bf27243b13d65ddc4195a825ec Mon Sep 17 00:00:00 2001 From: Simon Wisselink Date: Tue, 3 Sep 2024 22:07:15 +0100 Subject: [PATCH] Deployed cd58df7a to 5.x with MkDocs 1.5.3 and mike 2.0.0 --- 5.x/404.html | 42 + 5.x/api/basics/index.html | 42 + 5.x/api/caching/basics/index.html | 42 + .../caching/custom-storage-layers/index.html | 42 + .../multiple-caches-per-template/index.html | 42 + 5.x/api/configuring/index.html | 122 +- 5.x/api/extending/block-tags/index.html | 42 + 5.x/api/extending/extensions/index.html | 42 + 5.x/api/extending/introduction/index.html | 42 + 5.x/api/extending/modifiers/index.html | 42 + 5.x/api/extending/tags/index.html | 42 + 5.x/api/filters/output-filters/index.html | 42 + 5.x/api/filters/postfilters/index.html | 42 + 5.x/api/filters/prefilters/index.html | 42 + 5.x/api/inheritance/index.html | 42 + 5.x/api/rendering/index.html | 42 + 5.x/api/resources/index.html | 42 + 5.x/api/security/index.html | 42 + 5.x/api/variables/assigning/index.html | 42 + 5.x/api/variables/config-files/index.html | 42 + 5.x/api/variables/objects/index.html | 42 + .../variables/static-class-methods/index.html | 42 + 5.x/api/variables/streams/index.html | 44 + 5.x/appendixes/tips/index.html | 42 + 5.x/appendixes/troubleshooting/index.html | 42 + .../chapter-debugging-console/index.html | 42 + 5.x/designers/config-files/index.html | 42 + .../language-basic-syntax/index.html | 42 + .../language-escaping/index.html | 42 + .../language-syntax-attributes/index.html | 42 + .../language-syntax-comments/index.html | 42 + .../language-syntax-operators/index.html | 189 + .../language-syntax-quotes/index.html | 42 + .../language-syntax-tags/index.html | 42 + .../language-syntax-variables/index.html | 46 +- .../language-builtin-functions/index.html | 42 + .../language-function-append/index.html | 42 + .../language-function-assign/index.html | 42 + .../language-function-block/index.html | 42 + .../language-function-call/index.html | 42 + .../language-function-capture/index.html | 42 + .../language-function-config-load/index.html | 47 +- .../language-function-debug/index.html | 42 + .../language-function-extends/index.html | 42 + .../language-function-for/index.html | 42 + .../language-function-foreach/index.html | 42 + .../language-function-function/index.html | 42 + .../language-function-if/index.html | 180 +- .../language-function-include/index.html | 42 + .../language-function-insert/index.html | 42 + .../language-function-ldelim/index.html | 42 + .../language-function-literal/index.html | 42 + .../language-function-nocache/index.html | 42 + .../language-function-section/index.html | 42 + .../language-function-setfilter/index.html | 42 + .../language-function-strip/index.html | 42 + .../language-function-while/index.html | 179 +- .../language-combining-modifiers/index.html | 42 + .../language-custom-functions/index.html | 42 + .../language-function-counter/index.html | 42 + .../language-function-cycle/index.html | 42 + .../language-function-debug/index.html | 42 + .../language-function-eval/index.html | 42 + .../language-function-fetch/index.html | 42 + .../index.html | 42 + .../language-function-html-image/index.html | 42 + .../language-function-html-options/index.html | 42 + .../language-function-html-radios/index.html | 42 + .../index.html | 42 + .../index.html | 42 + .../language-function-html-table/index.html | 42 + .../language-function-mailto/index.html | 42 + .../language-function-math/index.html | 42 + .../language-function-textformat/index.html | 42 + 5.x/designers/language-modifiers/index.html | 42 + .../language-modifier-capitalize/index.html | 42 + .../language-modifier-cat/index.html | 42 + .../index.html | 42 + .../index.html | 42 + .../index.html | 42 + .../language-modifier-count-words/index.html | 42 + .../language-modifier-count/index.html | 42 + .../language-modifier-date-format/index.html | 42 + .../index.html | 42 + .../language-modifier-default/index.html | 42 + .../language-modifier-escape/index.html | 46 +- .../language-modifier-from-charset/index.html | 42 + .../language-modifier-indent/index.html | 44 +- .../language-modifier-is_array/index.html | 3457 +++++++++++++++++ .../language-modifier-isset/index.html | 44 +- .../language-modifier-join/index.html | 42 + .../language-modifier-json-encode/index.html | 42 + .../language-modifier-lower/index.html | 42 + .../language-modifier-nl2br/index.html | 44 +- .../language-modifier-noprint/index.html | 42 + .../index.html | 42 + .../language-modifier-raw/index.html | 3457 +++++++++++++++++ .../index.html | 44 +- .../language-modifier-replace/index.html | 42 + .../language-modifier-round/index.html | 42 + .../language-modifier-spacify/index.html | 42 + .../language-modifier-split/index.html | 42 + .../language-modifier-str-repeat/index.html | 42 + .../index.html | 42 + .../language-modifier-strip-tags/index.html | 42 + .../language-modifier-strip/index.html | 42 + .../language-modifier-strlen/index.html | 42 + .../language-modifier-substr/index.html | 42 + .../language-modifier-to-charset/index.html | 42 + .../language-modifier-truncate/index.html | 42 + .../language-modifier-unescape/index.html | 42 + .../language-modifier-upper/index.html | 42 + .../language-modifier-wordwrap/index.html | 42 + 5.x/designers/language-variables/index.html | 42 + .../language-assigned-variables/index.html | 42 + .../language-config-variables/index.html | 42 + .../language-variable-scopes/index.html | 42 + .../language-variables-smarty/index.html | 42 + 5.x/features/index.html | 42 + 5.x/getting-started/index.html | 56 +- 5.x/img/smarty.svg | 22 + 5.x/index.html | 42 + 5.x/philosophy/index.html | 42 + .../api-functions/add-extension/index.html | 42 + .../api-add-plugins-dir/index.html | 42 + .../api-functions/api-append/index.html | 42 + .../api-functions/api-assign/index.html | 42 + .../api-clear-all-assign/index.html | 42 + .../api-clear-all-cache/index.html | 42 + .../api-functions/api-clear-assign/index.html | 42 + .../api-functions/api-clear-cache/index.html | 42 + .../api-clear-compiled-tpl/index.html | 42 + .../api-functions/api-clear-config/index.html | 42 + .../api-compile-all-config/index.html | 42 + .../api-compile-all-templates/index.html | 42 + .../api-functions/api-config-load/index.html | 42 + .../api-functions/api-create-data/index.html | 42 + .../api-create-template/index.html | 42 + .../api-disable-security/index.html | 42 + .../api-functions/api-display/index.html | 42 + .../api-enable-security/index.html | 42 + .../api-functions/api-fetch/index.html | 42 + .../api-get-config-dir/index.html | 42 + .../api-get-config-vars/index.html | 42 + .../api-get-plugins-dir/index.html | 42 + .../api-get-registered-object/index.html | 42 + .../api-get-template-vars/index.html | 42 + .../api-functions/api-is-cached/index.html | 42 + .../api-functions/api-load-filter/index.html | 42 + .../api-mute-expected-errors/index.html | 42 + .../api-register-cacheresource/index.html | 42 + .../api-register-class/index.html | 42 + .../index.html | 42 + .../api-register-filter/index.html | 42 + .../api-register-object/index.html | 42 + .../api-register-plugin/index.html | 42 + .../api-register-resource/index.html | 42 + .../api-set-plugins-dir/index.html | 42 + .../api-functions/api-test-install/index.html | 42 + .../api-unregister-cacheresource/index.html | 42 + .../api-unregister-filter/index.html | 42 + .../api-unregister-object/index.html | 42 + .../api-unregister-plugin/index.html | 42 + .../api-unregister-resource/index.html | 42 + .../variable-auto-literal/index.html | 42 + .../variable-cache-dir/index.html | 42 + .../variable-cache-id/index.html | 42 + .../variable-cache-lifetime/index.html | 42 + .../variable-cache-locking/index.html | 42 + .../variable-cache-modified-check/index.html | 42 + .../variable-caching-type/index.html | 42 + .../api-variables/variable-caching/index.html | 42 + .../variable-compile-dir/index.html | 42 + .../variable-compile-id/index.html | 42 + .../variable-compile-locking/index.html | 42 + .../variable-compiler-class/index.html | 42 + .../variable-config-booleanize/index.html | 42 + .../variable-config-dir/index.html | 42 + .../variable-config-overwrite/index.html | 42 + .../variable-config-read-hidden/index.html | 42 + .../variable-debug-template/index.html | 42 + .../variable-debugging-ctrl/index.html | 42 + .../variable-debugging/index.html | 42 + .../index.html | 42 + .../variable-default-config-type/index.html | 42 + .../variable-default-modifiers/index.html | 42 + .../variable-default-resource-type/index.html | 42 + .../index.html | 42 + .../variable-error-reporting/index.html | 42 + .../variable-escape-html/index.html | 42 + .../variable-force-cache/index.html | 42 + .../variable-force-compile/index.html | 42 + .../variable-locking-timeout/index.html | 42 + .../index.html | 42 + .../variable-smarty-debug-id/index.html | 42 + .../variable-template-dir/index.html | 42 + .../variable-use-include-path/index.html | 42 + .../variable-use-sub-dirs/index.html | 42 + 5.x/search/search_index.json | 2 +- 5.x/sitemap.xml.gz | Bin 127 -> 127 bytes 5.x/upgrading/index.html | 42 + 201 files changed, 15393 insertions(+), 316 deletions(-) create mode 100644 5.x/designers/language-modifiers/language-modifier-is_array/index.html create mode 100644 5.x/designers/language-modifiers/language-modifier-raw/index.html create mode 100644 5.x/img/smarty.svg diff --git a/5.x/404.html b/5.x/404.html index f3cfe23d..908b1f76 100644 --- a/5.x/404.html +++ b/5.x/404.html @@ -1127,6 +1127,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1274,6 +1295,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/basics/index.html b/5.x/api/basics/index.html index 8a4d1a7e..8e02bc69 100644 --- a/5.x/api/basics/index.html +++ b/5.x/api/basics/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/caching/basics/index.html b/5.x/api/caching/basics/index.html index 4cc3b864..65e71afa 100644 --- a/5.x/api/caching/basics/index.html +++ b/5.x/api/caching/basics/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/caching/custom-storage-layers/index.html b/5.x/api/caching/custom-storage-layers/index.html index e34381c5..c6decf8e 100644 --- a/5.x/api/caching/custom-storage-layers/index.html +++ b/5.x/api/caching/custom-storage-layers/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/caching/multiple-caches-per-template/index.html b/5.x/api/caching/multiple-caches-per-template/index.html index 90ea7703..3930ee5f 100644 --- a/5.x/api/caching/multiple-caches-per-template/index.html +++ b/5.x/api/caching/multiple-caches-per-template/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/configuring/index.html b/5.x/api/configuring/index.html index 039a54c6..54191096 100644 --- a/5.x/api/configuring/index.html +++ b/5.x/api/configuring/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • @@ -3467,32 +3509,35 @@ 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');
     
    -// get all directories where config files are stored
    -$template_dirs = $smarty->getTemplateDir();
    -var_dump($template_dirs); // array
    -
    -// get directory identified by key
    -$template_dir = $smarty->getTemplateDir(0);
    -var_dump($template_dir); // string
    +// 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();
    +var_dump($template_dirs); // array
    +
    +// get directory identified by key
    +$template_dir = $smarty->getTemplateDir(0);
    +var_dump($template_dir); // string
     

    Setting the path for compiled templates

    Smarty compiles templates to native PHP to be as fast as possible. @@ -3573,6 +3618,31 @@ It's like Smarty magically adds |escape to every variable you use o

    Enable auto-escaping for HTML as follows:

    $smarty->setEscapeHtml(true);
     

    +

    When auto-escaping is enabled, the |escape modifier's default mode (html) has no effect, +to avoid double-escaping. It is possible to force it with the force mode. +Other modes (htmlall, url, urlpathinfo, quotes, javascript) may be used +with the result you might expect, without double-escaping.

    +

    Even when auto-escaping is enabled, you might want to display the content of a variable without +escaping it. To do so, use the |raw modifier.

    +

    Examples (with auto-escaping enabled): +

    {* these three statements are identical *}
    +{$myVar}
    +{$myVar|escape}
    +{$myVar|escape:'html'}
    +
    +{* no double-escaping on these statements *}
    +{$var|escape:'htmlall'}
    +{$myVar|escape:'url'}
    +{$myVar|escape:'urlpathinfo'}
    +{$myVar|escape:'quotes'}
    +{$myVar|escape:'javascript'}
    +
    +{* no escaping at all *}
    +{$myVar|raw}
    +
    +{* force double-escaping *}
    +{$myVar|escape:'force'}
    +

    Disabling compile check

    By default, Smarty tests to see if the current template has changed since the last time @@ -3580,8 +3650,8 @@ it was compiled. If it has changed, it recompiles that template.

    Once an application is put into production, this compile-check step is usually no longer needed and the extra checks can significantly hurt performance. Be sure to disable compile checking on production for maximum performance. -

    <?php
    -$smarty->setCompileCheck(\Smarty\Smarty::COMPILECHECK_OFF);
    +
    <?php
    +$smarty->setCompileCheck(\Smarty\Smarty::COMPILECHECK_OFF);
     

    If caching is enabled and compile-check is enabled, then the cache files will get regenerated if an involved @@ -3605,13 +3675,13 @@ strongly encouraged.

    Smarty\'s internals and core plugins are truly UTF-8 compatible since Smarty 3.1.

    -
    <?php
    -
    -// use japanese character encoding
    -mb_internal_charset('EUC-JP');
    -
    -\Smarty\Smarty::$_CHARSET = 'EUC-JP';
    -$smarty = new \Smarty\Smarty();
    +
    <?php
    +
    +// use japanese character encoding
    +mb_internal_charset('EUC-JP');
    +
    +\Smarty\Smarty::$_CHARSET = 'EUC-JP';
    +$smarty = new \Smarty\Smarty();
     
    diff --git a/5.x/api/extending/block-tags/index.html b/5.x/api/extending/block-tags/index.html index 40becf86..f392e56b 100644 --- a/5.x/api/extending/block-tags/index.html +++ b/5.x/api/extending/block-tags/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/extending/extensions/index.html b/5.x/api/extending/extensions/index.html index 42712e43..573d9f3a 100644 --- a/5.x/api/extending/extensions/index.html +++ b/5.x/api/extending/extensions/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/extending/introduction/index.html b/5.x/api/extending/introduction/index.html index 90f25aa4..0aec12c1 100644 --- a/5.x/api/extending/introduction/index.html +++ b/5.x/api/extending/introduction/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/extending/modifiers/index.html b/5.x/api/extending/modifiers/index.html index 60f08156..f181ac6c 100644 --- a/5.x/api/extending/modifiers/index.html +++ b/5.x/api/extending/modifiers/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/extending/tags/index.html b/5.x/api/extending/tags/index.html index 7b3e11ea..294a4199 100644 --- a/5.x/api/extending/tags/index.html +++ b/5.x/api/extending/tags/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/filters/output-filters/index.html b/5.x/api/filters/output-filters/index.html index 7c0f0096..574b2e4f 100644 --- a/5.x/api/filters/output-filters/index.html +++ b/5.x/api/filters/output-filters/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/filters/postfilters/index.html b/5.x/api/filters/postfilters/index.html index 020d7c2a..d3f8db23 100644 --- a/5.x/api/filters/postfilters/index.html +++ b/5.x/api/filters/postfilters/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/filters/prefilters/index.html b/5.x/api/filters/prefilters/index.html index 30a93f3f..7566b988 100644 --- a/5.x/api/filters/prefilters/index.html +++ b/5.x/api/filters/prefilters/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/inheritance/index.html b/5.x/api/inheritance/index.html index 9c05fb3f..afb62256 100644 --- a/5.x/api/inheritance/index.html +++ b/5.x/api/inheritance/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/rendering/index.html b/5.x/api/rendering/index.html index 4ea1c701..c91a9572 100644 --- a/5.x/api/rendering/index.html +++ b/5.x/api/rendering/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/resources/index.html b/5.x/api/resources/index.html index 4200f370..bce3fb5c 100644 --- a/5.x/api/resources/index.html +++ b/5.x/api/resources/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/security/index.html b/5.x/api/security/index.html index 14dce482..c68c6fad 100644 --- a/5.x/api/security/index.html +++ b/5.x/api/security/index.html @@ -1136,6 +1136,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1283,6 +1304,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/variables/assigning/index.html b/5.x/api/variables/assigning/index.html index a9b9730f..93ecbc36 100644 --- a/5.x/api/variables/assigning/index.html +++ b/5.x/api/variables/assigning/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/variables/config-files/index.html b/5.x/api/variables/config-files/index.html index a3f209b8..50e177b5 100644 --- a/5.x/api/variables/config-files/index.html +++ b/5.x/api/variables/config-files/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/variables/objects/index.html b/5.x/api/variables/objects/index.html index 9f7af6e8..c7f7d81f 100644 --- a/5.x/api/variables/objects/index.html +++ b/5.x/api/variables/objects/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/variables/static-class-methods/index.html b/5.x/api/variables/static-class-methods/index.html index 8fc757ae..be7060e9 100644 --- a/5.x/api/variables/static-class-methods/index.html +++ b/5.x/api/variables/static-class-methods/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/api/variables/streams/index.html b/5.x/api/variables/streams/index.html index ccd511ab..9057fcae 100644 --- a/5.x/api/variables/streams/index.html +++ b/5.x/api/variables/streams/index.html @@ -1138,6 +1138,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1285,6 +1306,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • @@ -3303,6 +3345,8 @@ template.

    {$foo:bar}
     
    +

    NB. Support for using streams to call variables is deprecated since Smarty v5.1 and will be removed +in a future version.

    See also Template Resources

    diff --git a/5.x/appendixes/tips/index.html b/5.x/appendixes/tips/index.html index 2e40c715..a79ad478 100644 --- a/5.x/appendixes/tips/index.html +++ b/5.x/appendixes/tips/index.html @@ -1132,6 +1132,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1279,6 +1300,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/appendixes/troubleshooting/index.html b/5.x/appendixes/troubleshooting/index.html index 636790b1..5d2123fb 100644 --- a/5.x/appendixes/troubleshooting/index.html +++ b/5.x/appendixes/troubleshooting/index.html @@ -1132,6 +1132,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1279,6 +1300,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/chapter-debugging-console/index.html b/5.x/designers/chapter-debugging-console/index.html index 48eb14d4..c193227e 100644 --- a/5.x/designers/chapter-debugging-console/index.html +++ b/5.x/designers/chapter-debugging-console/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/config-files/index.html b/5.x/designers/config-files/index.html index 332c2875..b0326827 100644 --- a/5.x/designers/config-files/index.html +++ b/5.x/designers/config-files/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-basic-syntax/index.html b/5.x/designers/language-basic-syntax/index.html index 37379828..2508d037 100644 --- a/5.x/designers/language-basic-syntax/index.html +++ b/5.x/designers/language-basic-syntax/index.html @@ -1154,6 +1154,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1301,6 +1322,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-basic-syntax/language-escaping/index.html b/5.x/designers/language-basic-syntax/language-escaping/index.html index cec84c98..b95f1d07 100644 --- a/5.x/designers/language-basic-syntax/language-escaping/index.html +++ b/5.x/designers/language-basic-syntax/language-escaping/index.html @@ -1193,6 +1193,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1340,6 +1361,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-basic-syntax/language-syntax-attributes/index.html b/5.x/designers/language-basic-syntax/language-syntax-attributes/index.html index 1a92fd33..569cc6a8 100644 --- a/5.x/designers/language-basic-syntax/language-syntax-attributes/index.html +++ b/5.x/designers/language-basic-syntax/language-syntax-attributes/index.html @@ -1193,6 +1193,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1340,6 +1361,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-basic-syntax/language-syntax-comments/index.html b/5.x/designers/language-basic-syntax/language-syntax-comments/index.html index f68afa71..9cff8657 100644 --- a/5.x/designers/language-basic-syntax/language-syntax-comments/index.html +++ b/5.x/designers/language-basic-syntax/language-syntax-comments/index.html @@ -1193,6 +1193,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1340,6 +1361,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-basic-syntax/language-syntax-operators/index.html b/5.x/designers/language-basic-syntax/language-syntax-operators/index.html index ab4677cb..d2a7374e 100644 --- a/5.x/designers/language-basic-syntax/language-syntax-operators/index.html +++ b/5.x/designers/language-basic-syntax/language-syntax-operators/index.html @@ -612,6 +612,15 @@ +
  • + +
  • + + + List + + +
  • @@ -1220,6 +1229,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1367,6 +1397,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • @@ -3373,6 +3424,15 @@ +
  • + +
  • + + + List + + +
  • @@ -3432,6 +3492,135 @@ focused on presentation. If you find your template syntax getting too complex, it may be a good idea to move the bits that do not deal explicitly with presentation to PHP by way of plugins or modifiers.

    +

    List

    +

    The following is a list of recognized operators, which must be +separated from surrounding elements by spaces. Note that items listed in +[brackets] are optional. PHP equivalents are shown where applicable.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    OperatorAlternatesSyntax ExampleMeaningPHP Equivalent
    ==eq$a eq $bequals==
    !=ne, neq$a neq $bnot equals!=
    >gt$a gt $bgreater than>
    <lt$a lt $bless than<
    >=gte, ge$a ge $bgreater than or equal>=
    <=lte, le$a le $bless than or equal<=
    ===$a === 0check for identity===
    !notnot $anegation (unary)!
    %mod$a mod $bmodulo%
    is [not] div by$a is not div by 4divisible by$a % $b == 0
    is [not] even$a is not even[not] an even number (unary)$a % 2 == 0
    is [not] even by$a is not even by $bgrouping level [not] even($a / $b) % 2 == 0
    is [not] odd$a is not odd[not] an odd number (unary)$a % 2 != 0
    is [not] odd by$a is not odd by $b[not] an odd grouping($a / $b) % 2 != 0
    is in$a is in $bexists in arrayin_array($a, $b)
    is [not] in$a is not in $bdoes not exist in array!in_array($a, $b)

    Ternary

    You can use the ?: (or ternary) operator to test one expression and present the value of the second or third expression, based on the result of the test.

    diff --git a/5.x/designers/language-basic-syntax/language-syntax-quotes/index.html b/5.x/designers/language-basic-syntax/language-syntax-quotes/index.html index 5a596d91..a9c8bf8d 100644 --- a/5.x/designers/language-basic-syntax/language-syntax-quotes/index.html +++ b/5.x/designers/language-basic-syntax/language-syntax-quotes/index.html @@ -1193,6 +1193,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1340,6 +1361,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-basic-syntax/language-syntax-tags/index.html b/5.x/designers/language-basic-syntax/language-syntax-tags/index.html index 0b791308..d33806ea 100644 --- a/5.x/designers/language-basic-syntax/language-syntax-tags/index.html +++ b/5.x/designers/language-basic-syntax/language-syntax-tags/index.html @@ -1193,6 +1193,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1340,6 +1361,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-basic-syntax/language-syntax-variables/index.html b/5.x/designers/language-basic-syntax/language-syntax-variables/index.html index ed5b8089..3fd78c21 100644 --- a/5.x/designers/language-basic-syntax/language-syntax-variables/index.html +++ b/5.x/designers/language-basic-syntax/language-syntax-variables/index.html @@ -1193,6 +1193,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1340,6 +1361,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • @@ -3438,10 +3480,6 @@ the \$dollar syntax and are instead referenced with surrounding Object chaining: {$object->method1($x)->method2($y)} - -Direct PHP function access: - -{time()}
  • Note

    diff --git a/5.x/designers/language-builtin-functions/index.html b/5.x/designers/language-builtin-functions/index.html index c246ae86..766461ca 100644 --- a/5.x/designers/language-builtin-functions/index.html +++ b/5.x/designers/language-builtin-functions/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-builtin-functions/language-function-append/index.html b/5.x/designers/language-builtin-functions/language-function-append/index.html index aab5580f..f1df1913 100644 --- a/5.x/designers/language-builtin-functions/language-function-append/index.html +++ b/5.x/designers/language-builtin-functions/language-function-append/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-builtin-functions/language-function-assign/index.html b/5.x/designers/language-builtin-functions/language-function-assign/index.html index 97ce3ab8..7950b5ee 100644 --- a/5.x/designers/language-builtin-functions/language-function-assign/index.html +++ b/5.x/designers/language-builtin-functions/language-function-assign/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-builtin-functions/language-function-block/index.html b/5.x/designers/language-builtin-functions/language-function-block/index.html index be55005d..862071a2 100644 --- a/5.x/designers/language-builtin-functions/language-function-block/index.html +++ b/5.x/designers/language-builtin-functions/language-function-block/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-builtin-functions/language-function-call/index.html b/5.x/designers/language-builtin-functions/language-function-call/index.html index 2239a023..e42f4c54 100644 --- a/5.x/designers/language-builtin-functions/language-function-call/index.html +++ b/5.x/designers/language-builtin-functions/language-function-call/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-builtin-functions/language-function-capture/index.html b/5.x/designers/language-builtin-functions/language-function-capture/index.html index 57f5ba0d..667411de 100644 --- a/5.x/designers/language-builtin-functions/language-function-capture/index.html +++ b/5.x/designers/language-builtin-functions/language-function-capture/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-builtin-functions/language-function-config-load/index.html b/5.x/designers/language-builtin-functions/language-function-config-load/index.html index 1b749eae..5648dc56 100644 --- a/5.x/designers/language-builtin-functions/language-function-config-load/index.html +++ b/5.x/designers/language-builtin-functions/language-function-config-load/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • @@ -3395,11 +3437,6 @@ No The name of the section to load - -scope -no -How the scope of the loaded variables are treated, which must be one of local, parent or global. local means variables are loaded into the local template context. parent means variables are loaded into both the local context and the parent template that called it. global means variables are available to all templates. -

    Examples

    diff --git a/5.x/designers/language-builtin-functions/language-function-debug/index.html b/5.x/designers/language-builtin-functions/language-function-debug/index.html index 04abcc44..db3e204e 100644 --- a/5.x/designers/language-builtin-functions/language-function-debug/index.html +++ b/5.x/designers/language-builtin-functions/language-function-debug/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-builtin-functions/language-function-extends/index.html b/5.x/designers/language-builtin-functions/language-function-extends/index.html index 360aad3b..b6f20020 100644 --- a/5.x/designers/language-builtin-functions/language-function-extends/index.html +++ b/5.x/designers/language-builtin-functions/language-function-extends/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-builtin-functions/language-function-for/index.html b/5.x/designers/language-builtin-functions/language-function-for/index.html index 637e1c44..abdfa58d 100644 --- a/5.x/designers/language-builtin-functions/language-function-for/index.html +++ b/5.x/designers/language-builtin-functions/language-function-for/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-builtin-functions/language-function-foreach/index.html b/5.x/designers/language-builtin-functions/language-function-foreach/index.html index d21a2a36..2fcf1bb1 100644 --- a/5.x/designers/language-builtin-functions/language-function-foreach/index.html +++ b/5.x/designers/language-builtin-functions/language-function-foreach/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-builtin-functions/language-function-function/index.html b/5.x/designers/language-builtin-functions/language-function-function/index.html index d4ec1ead..feb4bed4 100644 --- a/5.x/designers/language-builtin-functions/language-function-function/index.html +++ b/5.x/designers/language-builtin-functions/language-function-function/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • diff --git a/5.x/designers/language-builtin-functions/language-function-if/index.html b/5.x/designers/language-builtin-functions/language-function-if/index.html index fe0e0902..9043e167 100644 --- a/5.x/designers/language-builtin-functions/language-function-if/index.html +++ b/5.x/designers/language-builtin-functions/language-function-if/index.html @@ -1142,6 +1142,27 @@ +
  • + + + + + is_array + + + + +
  • + + + + + + + + + +
  • @@ -1289,6 +1310,27 @@ +
  • + + + + + raw + + + + +
  • + + + + + + + + + +
  • @@ -1970,15 +2012,6 @@