mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 03:44:26 +02:00
update documentation corrections from marcello in the forums. Thanks marcello!
This commit is contained in:
@@ -114,7 +114,9 @@ pageTitle = "Customer Info"
|
||||
<link linkend="config.files">Config Files</link>
|
||||
may also contain sections. You can load variables from
|
||||
within a section with the added attribute
|
||||
<parameter>section</parameter>.
|
||||
<parameter>section</parameter>. Note that global config
|
||||
variables are always loaded along with section variables,
|
||||
and same-named section variables overwrite the globals.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
|
@@ -3,10 +3,10 @@
|
||||
<sect1 id="language.function.foreach">
|
||||
<title>{foreach},{foreachelse}</title>
|
||||
<para>
|
||||
<varname>{foreach}</varname> is used to loop over a
|
||||
<emphasis role="bold">single associative array</emphasis>,
|
||||
<varname>{foreach}</varname> is used to loop over an
|
||||
<emphasis role="bold">associative array</emphasis> as well a numerically-indexed array,
|
||||
unlike <link linkend="language.function.section"><varname>{section}</varname></link>
|
||||
which is for looping over <emphasis role="bold">arrays of data</emphasis>.
|
||||
which is for looping over <emphasis role="bold">numerically-indexed arrays only</emphasis>.
|
||||
The syntax for
|
||||
<varname>{foreach}</varname> is much easier than
|
||||
<link linkend="language.function.section"><varname>{section}</varname></link>,
|
||||
|
@@ -15,9 +15,10 @@
|
||||
<emphasis>is_array()</emphasis>, etc.
|
||||
</para>
|
||||
<para>
|
||||
If <link linkend="variable.security"><parameter>$security</parameter></link> is enabled
|
||||
then <emphasis>IF_FUNCS</emphasis> array in the <link
|
||||
linkend="variable.security.settings"><parameter>$security_settings</parameter></link> array.
|
||||
If <link linkend="variable.security"><parameter>$security</parameter></link> is enabled,
|
||||
only PHP functions from the <emphasis>IF_FUNCS</emphasis> array from <link
|
||||
linkend="variable.security.settings"><parameter>$security_settings</parameter></link>
|
||||
are allowed.
|
||||
</para>
|
||||
<para>
|
||||
The following is a list of recognized qualifiers, which must be
|
||||
@@ -227,7 +228,7 @@
|
||||
<title>{if} with more examples</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{if isset($name) && $name = 'Blog'}
|
||||
{if isset($name) && $name == 'Blog'}
|
||||
{* do something *}
|
||||
{elseif $name == $foo}
|
||||
{* do something *}
|
||||
@@ -260,4 +261,4 @@
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
-->
|
||||
|
@@ -17,7 +17,7 @@
|
||||
<entry>Parameter Position</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Required</entry>
|
||||
<entry>cat</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
@@ -81,4 +81,4 @@ End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
-->
|
||||
|
@@ -85,7 +85,7 @@ $smarty->assign('articleTitle',
|
||||
|
||||
{$articleTitle|wordwrap:30:"<br />\n"}
|
||||
|
||||
{$articleTitle|wordwrap:30:"\n":true}
|
||||
{$articleTitle|wordwrap:26:"\n":true}
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
@@ -108,9 +108,9 @@ Blind woman gets new kidney<br />
|
||||
from dad she hasn't seen in<br />
|
||||
years.
|
||||
|
||||
Blind woman gets new kidney
|
||||
from dad she hasn't seen in
|
||||
years.
|
||||
Blind woman gets new kidn
|
||||
ey from dad she hasn't se
|
||||
en in years.
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
@@ -30,7 +30,7 @@
|
||||
</example>
|
||||
<note>
|
||||
<title>Top Tip</title>
|
||||
<para>As easy way to examine Smarty variables is with the
|
||||
<para>An easy way to examine Smarty variables is with the
|
||||
<link linkend="chapter.debugging.console">debugging console</link>.
|
||||
</para>
|
||||
</note>
|
||||
|
@@ -156,7 +156,7 @@ define('MY_CONST_VAL','CHERRIES');
|
||||
<para>
|
||||
Returns the name of the current template being processed.
|
||||
The following example shows the <filename>container.tpl</filename> and the
|
||||
<filename>included banner.tpl</filename> with
|
||||
included <filename>banner.tpl</filename> with
|
||||
<parameter>{$smarty.template}</parameter> within both.
|
||||
</para>
|
||||
<programlisting>
|
||||
|
Reference in New Issue
Block a user