mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
remove blanks on line endings
This commit is contained in:
@@ -7,7 +7,6 @@ Since 3.1.28 you can mix inheritance by extends resource with the {extends} tag.
|
|||||||
A template called by extends resource can extend a subtemplate or chain buy the {extends} tag.
|
A template called by extends resource can extend a subtemplate or chain buy the {extends} tag.
|
||||||
Since 3.1.31 this feature can be turned off by setting the new Smarty property Smarty::$extends_recursion to false.
|
Since 3.1.31 this feature can be turned off by setting the new Smarty property Smarty::$extends_recursion to false.
|
||||||
|
|
||||||
|
|
||||||
3.1.28
|
3.1.28
|
||||||
Starting with version 3.1.28 template inheritance is no longer a compile time process.
|
Starting with version 3.1.28 template inheritance is no longer a compile time process.
|
||||||
All {block} tag parent/child relations are resolved at run time.
|
All {block} tag parent/child relations are resolved at run time.
|
||||||
@@ -75,13 +74,11 @@ With this setting all {include} subtemplate will be merge into the compiled inhe
|
|||||||
could be rejected by exception.
|
could be rejected by exception.
|
||||||
|
|
||||||
|
|
||||||
If $smarty->inheritance_merge_compiled_includes = false; {include} subtemplate will not be merged.
|
If $smarty->inheritance_merge_compiled_includes = false; {include} subtemplate will not be merged.You must now manually merge all {include} subtemplate which do contain {block} tags. This is done by setting the "inline" option.
|
||||||
You must now manually merge all {include} subtemplate which do contain {block} tags. This is done by setting the "inline" option.
|
|
||||||
{include file='foo.bar' inline}
|
{include file='foo.bar' inline}
|
||||||
|
|
||||||
1. In case of a variable file name like {include file=$foo inline} you must use the variable in a compile_id $smarty->compile_id = $foo;
|
1. In case of a variable file name like {include file=$foo inline} you must use the variable in a compile_id $smarty->compile_id = $foo;
|
||||||
2. If you use individual compile_id in {include file='foo.tpl' compile_id=$bar inline} it must be used in the
|
2. If you use individual compile_id in {include file='foo.tpl' compile_id=$bar inline} it must be used in the global compile_id as well $smarty->compile_id = $bar;
|
||||||
global compile_id as well $smarty->compile_id = $bar;
|
|
||||||
3. If call templates with different template_dir configurations and a parent could same named child template from different folders
|
3. If call templates with different template_dir configurations and a parent could same named child template from different folders
|
||||||
you must make the folder name part of the compile_id.
|
you must make the folder name part of the compile_id.
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@ Smarty 3.1.32
|
|||||||
New Methods
|
New Methods
|
||||||
$smarty->setLiterals(array $literals)
|
$smarty->setLiterals(array $literals)
|
||||||
$smarty->addLiterals(array $literals)
|
$smarty->addLiterals(array $literals)
|
||||||
to define lietrals containing Smarty delimiter. This can avoid the need for extreme usage
|
to define literals containing Smarty delimiter. This can avoid the need for extreme usage
|
||||||
of {literal} {/literal} tags.
|
of {literal} {/literal} tags.
|
||||||
A) Treat '{{' and '}}' as literal
|
A) Treat '{{' and '}}' as literal
|
||||||
If Smarty::$auto_literal is enabled
|
If Smarty::$auto_literal is enabled
|
||||||
@@ -28,7 +28,7 @@ Smarty 3.1.32
|
|||||||
NOTE: In the last example nested Smarty tags starting with '{{' or ending with '}}' will not
|
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.
|
work any longer, but this should be very very raw occouring restriction.
|
||||||
B) Example 2
|
B) Example 2
|
||||||
Assume your delimiter are '<-' , '->' and '<--' , '-->' shall be lietrals
|
Assume your delimiter are '<-' , '->' and '<--' , '-->' shall be literals
|
||||||
$smarty->setLiteral(array('<--','-->'));
|
$smarty->setLiteral(array('<--','-->'));
|
||||||
|
|
||||||
|
|
||||||
@@ -87,8 +87,7 @@ Smarty 3.1.30
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
||||||
The {foreach} loop is rendered while processing the compiled template, but $current is a nocache
|
The {foreach} loop is rendered while processing the compiled template, but $current is a nocache
|
||||||
variable. Normally the {if $current==$item.id} would fail as the $item variable is unknown in the
|
variable. Normally the {if $current==$item.id} would fail as the $item variable is unknown in the cached template. {make_nocache $item} does make the current $item value known in thee cached template.
|
||||||
cached template. {make_nocache $item} does make the current $item value known in thee cached template.
|
|
||||||
|
|
||||||
{make_nocache} is ignored when caching is disabled or the variable does exists as nocache variable.
|
{make_nocache} is ignored when caching is disabled or the variable does exists as nocache variable.
|
||||||
|
|
||||||
@@ -123,8 +122,7 @@ Smarty 3.1.30
|
|||||||
Supported scope are parent, tpl_root, smarty, global and root.
|
Supported scope are parent, tpl_root, smarty, global and root.
|
||||||
A scope used together with the {include} tag will cause that with some exceptions any variable
|
A scope used together with the {include} tag will cause that with some exceptions any variable
|
||||||
assignment within that sub-template will update/assign the variable in other scopes according
|
assignment within that sub-template will update/assign the variable in other scopes according
|
||||||
to the above rules. It does include also variables assigned by plugins, tags supporting the assign=foo
|
to the above rules. It does include also variables assigned by plugins, tags supporting the assign=foo attribute and direct assignments in {if} and {while} like {if $foo=$bar}.
|
||||||
attribute and direct assignments in {if} and {while} like {if $foo=$bar}.
|
|
||||||
Excluded are the key and value variables of {foreach}, {for} loop variables , variables passed by attributes
|
Excluded are the key and value variables of {foreach}, {for} loop variables , variables passed by attributes
|
||||||
in {include} and direct increments/decrements like {$foo++}, {$foo--}
|
in {include} and direct increments/decrements like {$foo++}, {$foo--}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user