cvs: smarty /docs/en/designers language-basic-syntax.xml /docs/en/designers/language-basic-syntax language-syntax-variables.xml
"Monte Ohrt" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmohrt1102969642@cvsserver> |
mohrt Mon Dec 13 15:27:22 2004 EDT
Added files:
/smarty/docs/en/designers/language-basic-syntax
language-syntax-variables.xml
Modified files:
/smarty/docs/en/designers language-basic-syntax.xml
Log:
add language-syntax-variables file
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-basic-syntax.xml?r1=1.4&r2=1.5&ty=u
Index: smarty/docs/en/designers/language-basic-syntax.xml
diff -u smarty/docs/en/designers/language-basic-syntax.xml:1.4 smarty/docs/en/designers/language-basic-syntax.xml:1.5
--- smarty/docs/en/designers/language-basic-syntax.xml:1.4 Sun Apr 18 13:30:04 2004
+++ smarty/docs/en/designers/language-basic-syntax.xml Mon Dec 13 15:27:22 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<chapter id="language.basic.syntax">
<title>Basic Syntax</title>
<para>
@@ -16,6 +16,7 @@
</para>
&designers.language-basic-syntax.language-syntax-comments;
+ &designers.language-basic-syntax.language-syntax-variables;
&designers.language-basic-syntax.language-syntax-functions;
&designers.language-basic-syntax.language-syntax-attributes;
&designers.language-basic-syntax.language-syntax-quotes;
http://cvs.php.net/co.php/smarty/docs/en/designers/language-basic-syntax/language-syntax-variables.xml?r=1.1&p=1
Index: smarty/docs/en/designers/language-basic-syntax/language-syntax-variables.xml
+++ smarty/docs/en/designers/language-basic-syntax/language-syntax-variables.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<sect1 id="language.syntax.variables">
<title>Variables</title>
<para>
Template variables start with a dollar sign. They can contain numbers,
letters and underscores, much like a PHP variable. You can reference arrays
that are indexed numerically or non-numerically. You can also reference
object properties and methods. Config file variables are an exception to the
dollar sign syntax. They can be referenced with surrounding hashmarks, or
with the special $smarty.config variable.
</para>
<example>
<title>Variables</title>
<programlisting>
<![CDATA[
{$foo} <-- displaying a simple variable (non array/object)
{$foo[4]} <-- display the 5th element of a zero-indexed array
{$foo.bar} <-- display the "bar" key value of an array, similar to PHP $foo['bar']
{$foo.$bar} <-- display the key value of an array denoted by the value $bar
{$foo->bar} <-- display the object property "bar"
{$foo->bar()} <-- display the object method return value for "bar"
{#foo#} <-- display the config file variable "foo"
{$smarty.config.foo} <-- synonym for {#foo#}
{$foo[bar]} <-- syntax only valid in a section loop, see {section}
]]>
</programlisting>
</example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php