mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
Fix typos
This commit is contained in:
@@ -9,23 +9,23 @@ This does enable some new features:
|
|||||||
|
|
||||||
Any code outside root {block} tags in child templates is now executed but any output will be ignored.
|
Any code outside root {block} tags in child templates is now executed but any output will be ignored.
|
||||||
|
|
||||||
{extends 'foo.tpl}
|
{extends 'foo.tpl'}
|
||||||
{$bar = 'on'} // assigns variable $bar seen in parent templates
|
{$bar = 'on'} // assigns variable $bar seen in parent templates
|
||||||
{block 'buh'}{/block}
|
{block 'buh'}{/block}
|
||||||
|
|
||||||
{extends 'foo.tpl}
|
{extends 'foo.tpl'}
|
||||||
{$bar} // the output of variable bar is ignored
|
{$bar} // the output of variable bar is ignored
|
||||||
{block 'buh'}{/block}
|
{block 'buh'}{/block}
|
||||||
|
|
||||||
{block} tags can be dynamically en/disabled by conditions.
|
{block} tags can be dynamically en/disabled by conditions.
|
||||||
|
|
||||||
{block 'root}
|
{block 'root'}
|
||||||
{if $foo}
|
{if $foo}
|
||||||
{block 'v1}
|
{block 'v1'}
|
||||||
....
|
....
|
||||||
{/block}
|
{/block}
|
||||||
{else}
|
{else}
|
||||||
{block 'v1}
|
{block 'v1'}
|
||||||
....
|
....
|
||||||
{/block}
|
{/block}
|
||||||
{/if}
|
{/if}
|
||||||
|
@@ -21,13 +21,18 @@ Smarty 3.1.28
|
|||||||
fetch() and display()
|
fetch() and display()
|
||||||
=====================
|
=====================
|
||||||
The fetch() and display() methods of the template object accept now optionally the same parameter
|
The fetch() and display() methods of the template object accept now optionally the same parameter
|
||||||
as the corresponding Smarty methods the get tne content of another template.
|
as the corresponding Smarty methods to get tne content of another template.
|
||||||
|
Example:
|
||||||
|
$template->display(); Does display template of template object
|
||||||
|
$template->dispaly('foo.tpl'); Does display template 'foo.bar'
|
||||||
|
|
||||||
File: resource
|
File: resource
|
||||||
==============
|
==============
|
||||||
Multiple template_dir entries can now be selected by a comma separated list of indices.
|
Multiple template_dir entries can now be selected by a comma separated list of indices.
|
||||||
The template_dir array is searched in the order of the indices. (could be used to change the default search order)
|
The template_dir array is searched in the order of the indices. (Could be used to change the default search order)
|
||||||
|
Example:
|
||||||
|
$smarty->display([1],[0]foo.bar');
|
||||||
|
|
||||||
Filter support
|
Filter support
|
||||||
==============
|
==============
|
||||||
Optional filter names
|
Optional filter names
|
||||||
@@ -40,8 +45,8 @@ Smarty 3.1.28
|
|||||||
- $smarty->registerFilter('pre', function($source) {return $source;});
|
- $smarty->registerFilter('pre', function($source) {return $source;});
|
||||||
If no optional filter name was specified it gets the default name 'closure'.
|
If no optional filter name was specified it gets the default name 'closure'.
|
||||||
If you register multiple closures register each with a unique filter name.
|
If you register multiple closures register each with a unique filter name.
|
||||||
- $smarty->registerFilter('pre', function($source) {return $source;}, 'clousre_1');
|
- $smarty->registerFilter('pre', function($source) {return $source;}, 'closure_1');
|
||||||
- $smarty->registerFilter('pre', function($source) {return $source;}, 'clousre_2');
|
- $smarty->registerFilter('pre', function($source) {return $source;}, 'closure_2');
|
||||||
|
|
||||||
|
|
||||||
Smarty 3.1.22
|
Smarty 3.1.22
|
||||||
|
Reference in New Issue
Block a user