mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 03:44:26 +02:00
tweek
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
function and its
|
function and its
|
||||||
<link linkend="language.syntax.attributes">attributes</link>
|
<link linkend="language.syntax.attributes">attributes</link>
|
||||||
within delimiters like so: {funcname
|
within delimiters like so: {funcname
|
||||||
attr1='val1' attrto='val2'}.
|
attr1='val1' attr2='val2'}.
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>function syntax</title>
|
<title>function syntax</title>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
{config_load file='colors.conf'}
|
{config_load file='colors.conf'}
|
||||||
|
|
||||||
{include file='header.tpl'}
|
{include file='header.tpl'}
|
||||||
{insert file='banner_ads.tpl'}
|
{insert file='banner_ads.tpl' title='Smarty is cool'}
|
||||||
|
|
||||||
{if $logged_in}
|
{if $logged_in}
|
||||||
Welcome, <font color="{#fontColor#}">{$name}!</font>
|
Welcome, <font color="{#fontColor#}">{$name}!</font>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
hi, {$name}
|
hi, {$name}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{include file='footer.tpl'}
|
{include file='footer.tpl' ad=$random_id}
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
@@ -47,7 +47,7 @@ Many other combinations are allowed
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<para>Request variables such as $_GET, $_SESSION etc are available with the <emphasis role="bold">
|
<para>Request variables such as $_GET, $_SESSION etc are available via the <emphasis role="bold">
|
||||||
<link linkend="language.variables.smarty">$smarty</link></emphasis> reserved variable.
|
<link linkend="language.variables.smarty">$smarty</link></emphasis> reserved variable.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@@ -13,8 +13,9 @@
|
|||||||
template from the variable <link
|
template from the variable <link
|
||||||
linkend="language.variables.smarty.capture">$smarty.capture.foo</link>
|
linkend="language.variables.smarty.capture">$smarty.capture.foo</link>
|
||||||
where "foo" is the value passed in the name attribute. If you do not
|
where "foo" is the value passed in the name attribute. If you do not
|
||||||
supply a name attribute, then "default" will be used as in $smarty.capture.default.
|
supply a name attribute, then "default" will be used as the name
|
||||||
You can nest capture commands.
|
ie $smarty.capture.default </para>
|
||||||
|
<para>{capture}'s can be nested.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<sect1 id="language.modifier.escape">
|
<sect1 id="language.modifier.escape">
|
||||||
<title>escape</title>
|
<title>escape</title>
|
||||||
<para>
|
<para>
|
||||||
This is used to encode/escape and a variable to html url single quotes, hex escape, hexentity, javascript and mail escape.
|
This is used to encode/escape a variable to html url single quotes, hex escape, hexentity, javascript and mail escape.
|
||||||
By default its html
|
By default its html
|
||||||
escaped.
|
escaped.
|
||||||
</para>
|
</para>
|
||||||
@@ -74,6 +74,7 @@ $smarty->assign('EmailAddress','smarty@example.com');
|
|||||||
{$articleTitle|escape:'quotes'}
|
{$articleTitle|escape:'quotes'}
|
||||||
<a href="mailto:{$EmailAddress|escape:"hex"}">{$EmailAddress|escape:"hexentity"}</a>
|
<a href="mailto:{$EmailAddress|escape:"hex"}">{$EmailAddress|escape:"hexentity"}</a>
|
||||||
{$EmailAddress|escape:'mail'} {* this converts to email to text *}
|
{$EmailAddress|escape:'mail'} {* this converts to email to text *}
|
||||||
|
{'mail@example.com'|escape:'mail'}
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
@@ -89,6 +90,7 @@ $smarty->assign('EmailAddress','smarty@example.com');
|
|||||||
\'Stiff Opposition Expected to Casketless Funeral Plan\'
|
\'Stiff Opposition Expected to Casketless Funeral Plan\'
|
||||||
<a href="mailto:%62%6f%..snip..%65%74">bob..snip..et</a>
|
<a href="mailto:%62%6f%..snip..%65%74">bob..snip..et</a>
|
||||||
smarty [AT] example [DOT] com
|
smarty [AT] example [DOT] com
|
||||||
|
mail [AT] example [DOT] com
|
||||||
]]>
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
<para>Note that native PHP functions can be used as modifiers so this will work</para>
|
<para>Note that native PHP functions can be used as modifiers so this will work</para>
|
||||||
|
Reference in New Issue
Block a user