cvs: smarty /docs/en/designers/language-basic-syntax language-syntax-quotes.xml
"Monte Ohrt" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmohrt1103572354@cvsserver> |
mohrt Mon Dec 20 14:52:34 2004 EDT
Modified files:
/smarty/docs/en/designers/language-basic-syntax
language-syntax-quotes.xml
Log:
update quote docs to mention modifiers must be outside quotes
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-basic-syntax/language-syntax-quotes.xml?r1=1.2&r2=1.3&ty=u
Index: smarty/docs/en/designers/language-basic-syntax/language-syntax-quotes.xml
diff -u smarty/docs/en/designers/language-basic-syntax/language-syntax-quotes.xml:1.2 smarty/docs/en/designers/language-basic-syntax/language-syntax-quotes.xml:1.3
--- smarty/docs/en/designers/language-basic-syntax/language-syntax-quotes.xml:1.2 Sun Apr 18 13:34:12 2004
+++ smarty/docs/en/designers/language-basic-syntax/language-syntax-quotes.xml Mon Dec 20 14:52:32 2004
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<sect1 id="language.syntax.quotes">
<title>Embedding Vars in Double Quotes</title>
<para>
- Smarty will recognize assigned variables embedded in double quotes so long
- as the variables contain only numbers, letters, underscores and brackets
- []. With any other characters (period, object reference, etc.) the variable
- must be surrounded by backticks.
+ Smarty will recognize assigned variables embedded in double quotes so long as
+ the variables contain only numbers, letters, underscores and brackets [].
+ With any other characters (period, object reference, etc.) the variable must
+ be surrounded by backticks. You cannot embed modifiers, they must always be
+ applied outside of quotes.
</para>
<example>
<title>embedded quotes syntax</title>
@@ -19,6 +20,7 @@
{func var="test $foo[bar] test"} <-- sees $foo[bar]
{func var="test $foo.bar test"} <-- sees $foo (not $foo.bar)
{func var="test `$foo.bar` test"} <-- sees $foo.bar
+{func var="test `$foo.bar` test"|escape} <-- modifiers outside quotes!
PRACTICAL EXAMPLES:
{include file="subdir/$tpl_name.tpl"} <-- will replace $tpl_name with value
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php