diff options
| author | Uwe Tews <uwe.tews@googlemail.com> | 2017-10-07 08:20:18 +0200 |
|---|---|---|
| committer | Uwe Tews <uwe.tews@googlemail.com> | 2017-10-07 08:20:18 +0200 |
| commit | b0ea1cb5df615a44fc9181c9a8d5436cc1276378 (patch) | |
| tree | 4d2fe6c2b74ce0448be83fc216043f58192a5eaf /NEW_FEATURES.txt | |
| parent | deb9e12aaa0f955da08d54f8ac525682389b5a81 (diff) | |
| download | smarty-b0ea1cb5df615a44fc9181c9a8d5436cc1276378.tar.gz smarty-b0ea1cb5df615a44fc9181c9a8d5436cc1276378.tar.bz2 smarty-b0ea1cb5df615a44fc9181c9a8d5436cc1276378.zip | |
Improve extension handler
Diffstat (limited to 'NEW_FEATURES.txt')
| -rw-r--r-- | NEW_FEATURES.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/NEW_FEATURES.txt b/NEW_FEATURES.txt index bddc631f..43b7ee85 100644 --- a/NEW_FEATURES.txt +++ b/NEW_FEATURES.txt @@ -3,6 +3,29 @@ This file contains a brief description of new features which have been added to Smarty 3.1 Smarty 3.1.32 + + Using literals containing Smarty's left and right delimiter + =========================================================== + New Methods + $smarty->setLiterals(array $literals) + $smarty->addLiterals(array $literals) + to define lietrals containing Smarty delimiter. This can avoid the need for extreme usage + of {literal} {/literal} tags. + A) Treat '{{' and '}}' as literal + If Smarty::$auto_literal is enabled + {{ foo }} + will be treated now as literal. (This does apply for any number of delimiter repeatations). + However {{foo}} is not an literal but will be interpreted as a recursive Smarty tag. + If you use + $smarty->setLiteral(array('{{','}}')); + {{foo}} is now a literal as well. + NOTE: In the last example nested Smarty tags starting with '{{' or ending with '}}' will not + work any longer, but this should be very very raw occouring restriction. + B) Example 2 + Assume your delimiter are '<-' , '->' and '<--' , '-->' shall be lietrals + $smarty->setLiteral(array('<--','-->')); + + The capture buffers can now be accessed as array ================================================ {capture name='foo'} |
