cvs: smarty /docs/en/designers language-modifiers.xml
"Monte Ohrt" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmohrt1107279779@cvsserver> |
mohrt Tue Feb 1 12:42:59 2005 EDT
Modified files:
/smarty/docs/en/designers language-modifiers.xml
Log:
update examples, give more detail
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers.xml?r1=1.14&r2=1.15&ty=u
Index: smarty/docs/en/designers/language-modifiers.xml
diff -u smarty/docs/en/designers/language-modifiers.xml:1.14 smarty/docs/en/designers/language-modifiers.xml:1.15
--- smarty/docs/en/designers/language-modifiers.xml:1.14 Sat Jul 3 04:41:02 2004
+++ smarty/docs/en/designers/language-modifiers.xml Tue Feb 1 12:42:59 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.14 $ -->
+<!-- $Revision: 1.15 $ -->
<chapter id="language.modifiers">
<title>Variable Modifiers</title>
<para>
@@ -13,14 +13,21 @@
<title>modifier example</title>
<programlisting>
<![CDATA[
-{* Uppercase the title *}
-<h2>{$title|upper}</h2>
+{* apply modifier to a variable *}
+{$title|upper}
+{* modifier with parameters *}
+{$title|truncate:40:"..."}
-{* Truncate the topic to 40 characters use ... at the end *}
-Topic: {$topic|truncate:40:"..."}
+{* apply modifier to a function parameter *}
+{html_table loop=$myvar|upper}
+{* with parameters *}
+{html_table loop=$myvar|truncate:40:"..."}
-{* format a literal string *}
-{"now"|date_format:"%Y/%m/%d"}
+{* apply modifier to literal string *}
+{"foobar"|upper}
+
+{* using date_format to format the current date *}
+{$smarty.now|date_format:"%Y/%m/%d"}
{* apply modifier to a custom function *}
{mailto|upper address="[email protected]"}
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php