This commit is contained in:
pete_morgan
2006-03-28 00:16:33 +00:00
parent 6b920dcdb3
commit a2acf082b9
4 changed files with 10 additions and 7 deletions

View File

@@ -9,7 +9,7 @@
function and its
<link linkend="language.syntax.attributes">attributes</link>
within delimiters like so: {funcname
attr1='val1' attrto='val2'}.
attr1='val1' attr2='val2'}.
</para>
<example>
<title>function syntax</title>
@@ -18,7 +18,7 @@
{config_load file='colors.conf'}
{include file='header.tpl'}
{insert file='banner_ads.tpl'}
{insert file='banner_ads.tpl' title='Smarty is cool'}
{if $logged_in}
Welcome, <font color="{#fontColor#}">{$name}!</font>
@@ -26,7 +26,7 @@
hi, {$name}
{/if}
{include file='footer.tpl'}
{include file='footer.tpl' ad=$random_id}
]]>
</programlisting>
</example>

View File

@@ -47,7 +47,7 @@ Many other combinations are allowed
</programlisting>
</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.
</para>

View File

@@ -13,8 +13,9 @@
template from the variable <link
linkend="language.variables.smarty.capture">$smarty.capture.foo</link>
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.
You can nest capture commands.
supply a name attribute, then "default" will be used as the name
ie $smarty.capture.default </para>
<para>{capture}'s can be nested.
</para>

View File

@@ -3,7 +3,7 @@
<sect1 id="language.modifier.escape">
<title>escape</title>
<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
escaped.
</para>
@@ -74,6 +74,7 @@ $smarty->assign('EmailAddress','smarty@example.com');
{$articleTitle|escape:'quotes'}
<a href="mailto:{$EmailAddress|escape:"hex"}">{$EmailAddress|escape:"hexentity"}</a>
{$EmailAddress|escape:'mail'} {* this converts to email to text *}
{'mail@example.com'|escape:'mail'}
]]>
</programlisting>
<para>
@@ -89,6 +90,7 @@ $smarty->assign('EmailAddress','smarty@example.com');
\'Stiff Opposition Expected to Casketless Funeral Plan\'
<a href="mailto:%62%6f%..snip..%65%74">&#x62;&#x6f;&#x62..snip..&#x65;&#x74;</a>
smarty [AT] example [DOT] com
mail [AT] example [DOT] com
]]>
</screen>
<para>Note that native PHP functions can be used as modifiers so this will work</para>