[prev in list] [next in list] [prev in thread] [next in thread]
List: smarty-cvs
Subject: [SMARTY-CVS] cvs: smarty /docs/en/designers/language-basic-syntax language-escaping.xml language-mat
From: "Mehdi Achour" <didou () php ! net>
Date: 2004-04-18 17:34:12
Message-ID: cvsdidou1082309652 () cvsserver
[Download RAW message or body]
didou Sun Apr 18 13:34:12 2004 EDT
Modified files:
/smarty/docs/en/designers/language-basic-syntax
language-escaping.xml
language-math.xml
language-syntax-attributes.xml
language-syntax-comments.xml
language-syntax-functions.xml
language-syntax-quotes.xml
Log:
WS
["didou-20040418133412.txt" (text/plain)]
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-basic-syntax/language-escaping.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/designers/language-basic-syntax/language-escaping.xml
diff -u smarty/docs/en/designers/language-basic-syntax/language-escaping.xml:1.1 \
smarty/docs/en/designers/language-basic-syntax/language-escaping.xml:1.2
--- smarty/docs/en/designers/language-basic-syntax/language-escaping.xml:1.1 Tue Apr \
13 04:40:21 2004
+++ smarty/docs/en/designers/language-basic-syntax/language-escaping.xml Sun Apr 18 \
13:34:12 2004 @@ -1,35 +1,35 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
- <sect1 id="language.escaping">
- <title>Escaping Smarty Parsing</title>
- <para>
- It is sometimes desirable or even necessary to have Smarty ignore sections it
- would otherwise parse. A classic example is embedding Javascript or CSS code in
- a template. The problem arises as those languages use the { and } characters
- which are also the default delimiters for Smarty.
- </para>
-
- <para>
- The simplest thing is to avoid the situation altogether by separating your \
Javascript
- and CSS code into their own files and then using standard HTML methods to \
access them.
- </para>
-
- <para>
- Including literal content is possible using <link
- linkend="language.function.literal">{literal} .. {/literal}</link> blocks.
- Similar to HTML entity usage, you can use <link
- linkend="language.function.ldelim">{ldelim}</link> and <link
- linkend="language.function.ldelim">{rdelim}</link> to display the current \
delimiters.
- </para>
-
- <para>
- It is often convenient to simply change Smarty's <link
- linkend="variable.left.delimiter">$left_delimiter</link> and
- <link linkend="variable.right.delimiter">$right_delimiter</link>.
- </para>
- <example>
- <title>changing delimiters example</title>
- <programlisting role="php">
+<!-- $Revision: 1.2 $ -->
+<sect1 id="language.escaping">
+ <title>Escaping Smarty Parsing</title>
+ <para>
+ It is sometimes desirable or even necessary to have Smarty ignore sections it
+ would otherwise parse. A classic example is embedding Javascript or CSS code in
+ a template. The problem arises as those languages use the { and } characters
+ which are also the default delimiters for Smarty.
+ </para>
+
+ <para>
+ The simplest thing is to avoid the situation altogether by separating your \
Javascript + and CSS code into their own files and then using standard HTML methods \
to access them. + </para>
+
+ <para>
+ Including literal content is possible using <link
+ linkend="language.function.literal">{literal} .. {/literal}</link> blocks.
+ Similar to HTML entity usage, you can use <link
+ linkend="language.function.ldelim">{ldelim}</link> and <link
+ linkend="language.function.ldelim">{rdelim}</link> to display the current \
delimiters. + </para>
+
+ <para>
+ It is often convenient to simply change Smarty's <link
+ linkend="variable.left.delimiter">$left_delimiter</link> and
+ <link linkend="variable.right.delimiter">$right_delimiter</link>.
+ </para>
+ <example>
+ <title>changing delimiters example</title>
+ <programlisting role="php">
<![CDATA[
<?php
@@ -40,8 +40,13 @@
$smarty->display('example.tpl');
?>
-
---- example.tpl
+]]>
+ </programlisting>
+ <para>
+ Where example.tpl is:
+ </para>
+ <programlisting>
+<![CDATA[
<script language="javascript">
var foo = <!--{$foo}-->;
function dosomething() {
@@ -50,8 +55,8 @@
dosomething();
</script>
]]>
- </programlisting>
- </example>
+ </programlisting>
+ </example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
@@ -72,4 +77,4 @@
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
--->
\ No newline at end of file
+-->
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-basic-syntax/language-math.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/designers/language-basic-syntax/language-math.xml
diff -u smarty/docs/en/designers/language-basic-syntax/language-math.xml:1.1 \
smarty/docs/en/designers/language-basic-syntax/language-math.xml:1.2
--- smarty/docs/en/designers/language-basic-syntax/language-math.xml:1.1 Tue Apr 13 \
04:40:21 2004
+++ smarty/docs/en/designers/language-basic-syntax/language-math.xml Sun Apr 18 \
13:34:12 2004 @@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
- <sect1 id="language.math">
- <title>Math</title>
- <para>
- Math can be applied directly to variable values.
- </para>
- <example>
- <title>math examples</title>
- <programlisting>
+<!-- $Revision: 1.2 $ -->
+<sect1 id="language.math">
+ <title>Math</title>
+ <para>
+ Math can be applied directly to variable values.
+ </para>
+ <example>
+ <title>math examples</title>
+ <programlisting>
<![CDATA[
{$foo+1}
@@ -23,8 +23,8 @@
{assign var="foo" value="`$foo+$bar`"}
]]>
- </programlisting>
- </example>
+ </programlisting>
+ </example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
@@ -45,4 +45,4 @@
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
--->
\ No newline at end of file
+-->
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-basic-syntax/language-syntax-attributes.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/designers/language-basic-syntax/language-syntax-attributes.xml
diff -u smarty/docs/en/designers/language-basic-syntax/language-syntax-attributes.xml:1.1 \
smarty/docs/en/designers/language-basic-syntax/language-syntax-attributes.xml:1.2
--- smarty/docs/en/designers/language-basic-syntax/language-syntax-attributes.xml:1.1 Tue \
Apr 13 04:40:21 2004
+++ smarty/docs/en/designers/language-basic-syntax/language-syntax-attributes.xml Sun \
Apr 18 13:34:12 2004 @@ -1,24 +1,24 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
- <sect1 id="language.syntax.attributes">
- <title>Attributes</title>
- <para>
- Most of the functions take attributes that specify or modify
- their behavior. Attributes to Smarty functions are much like HTML
- attributes. Static values don't have to be enclosed in quotes, but it
- is recommended for literal strings. Variables may also be used, and
- should not be in quotes.
- </para>
- <para>
- Some attributes require boolean values (true or false). These can be
- specified as either unquoted <literal>true</literal>,
- <literal>on</literal>, and <literal>yes</literal>, or
- <literal>false</literal>, <literal>off</literal>, and
- <literal>no</literal>.
- </para>
- <example>
- <title>function attribute syntax</title>
- <programlisting>
+<!-- $Revision: 1.2 $ -->
+<sect1 id="language.syntax.attributes">
+ <title>Attributes</title>
+ <para>
+ Most of the functions take attributes that specify or modify
+ their behavior. Attributes to Smarty functions are much like HTML
+ attributes. Static values don't have to be enclosed in quotes, but it
+ is recommended for literal strings. Variables may also be used, and
+ should not be in quotes.
+ </para>
+ <para>
+ Some attributes require boolean values (true or false). These can be
+ specified as either unquoted <literal>true</literal>,
+ <literal>on</literal>, and <literal>yes</literal>, or
+ <literal>false</literal>, <literal>off</literal>, and
+ <literal>no</literal>.
+ </para>
+ <example>
+ <title>function attribute syntax</title>
+ <programlisting>
<![CDATA[
{include file="header.tpl"}
@@ -32,8 +32,8 @@
{html_options values=$vals selected=$selected output=$output}
</select>
]]>
- </programlisting>
- </example>
+ </programlisting>
+ </example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
@@ -54,4 +54,4 @@
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
--->
\ No newline at end of file
+-->
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-basic-syntax/language-syntax-comments.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/designers/language-basic-syntax/language-syntax-comments.xml
diff -u smarty/docs/en/designers/language-basic-syntax/language-syntax-comments.xml:1.1 \
smarty/docs/en/designers/language-basic-syntax/language-syntax-comments.xml:1.2
--- smarty/docs/en/designers/language-basic-syntax/language-syntax-comments.xml:1.1 Tue \
Apr 13 04:40:21 2004
+++ smarty/docs/en/designers/language-basic-syntax/language-syntax-comments.xml Sun \
Apr 18 13:34:12 2004 @@ -1,16 +1,16 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
- <sect1 id="language.syntax.comments">
- <title>Comments</title>
- <para>
- Template comments are surrounded by asterisks, and that is surrounded
- by the delimiter tags like so: {* this is a comment *}
- Smarty comments are not displayed in the final output of the template.
- They are used for making internal notes in the templates.
- </para>
- <example>
- <title>Comments</title>
- <programlisting>
+<!-- $Revision: 1.2 $ -->
+<sect1 id="language.syntax.comments">
+ <title>Comments</title>
+ <para>
+ Template comments are surrounded by asterisks, and that is surrounded
+ by the delimiter tags like so: {* this is a comment *}
+ Smarty comments are not displayed in the final output of the template.
+ They are used for making internal notes in the templates.
+ </para>
+ <example>
+ <title>Comments</title>
+ <programlisting>
<![CDATA[
{* Smarty *}
@@ -26,8 +26,8 @@
{html_options values=$vals selected=$selected output=$output}
</select>
]]>
- </programlisting>
- </example>
+ </programlisting>
+ </example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-basic-syntax/language-syntax-functions.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/designers/language-basic-syntax/language-syntax-functions.xml
diff -u smarty/docs/en/designers/language-basic-syntax/language-syntax-functions.xml:1.1 \
smarty/docs/en/designers/language-basic-syntax/language-syntax-functions.xml:1.2
--- smarty/docs/en/designers/language-basic-syntax/language-syntax-functions.xml:1.1 Tue \
Apr 13 04:40:21 2004
+++ smarty/docs/en/designers/language-basic-syntax/language-syntax-functions.xml Sun \
Apr 18 13:34:12 2004 @@ -1,17 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
- <sect1 id="language.syntax.functions">
- <title>Functions</title>
- <para>
- Each Smarty tag either prints a
- <link linkend="language.variables">variable</link> or invokes some sort
- of function. Functions are processed and displayed by enclosing the
- function and its attributes into delimiters like so: {funcname
- attr1="val" attr2="val"}.
- </para>
- <example>
- <title>function syntax</title>
- <programlisting>
+<!-- $Revision: 1.2 $ -->
+<sect1 id="language.syntax.functions">
+ <title>Functions</title>
+ <para>
+ Each Smarty tag either prints a
+ <link linkend="language.variables">variable</link> or invokes some sort
+ of function. Functions are processed and displayed by enclosing the
+ function and its attributes into delimiters like so: {funcname
+ attr1="val" attr2="val"}.
+ </para>
+ <example>
+ <title>function syntax</title>
+ <programlisting>
<![CDATA[
{config_load file="colors.conf"}
@@ -25,17 +25,17 @@
{include file="footer.tpl"}
]]>
- </programlisting>
- </example>
- <para>
- Both built-in functions and custom functions have the same syntax in
- the templates. Built-in functions are the inner workings of Smarty,
- such as <command>if</command>, <command>section</command> and
- <command>strip</command>. They cannot be modified. Custom functions are
- additional functions implemented via plugins. They can be modified to
- your liking, or you can add new ones. <command>html_options</command> and
- <command>html_select_date</command> are examples of custom functions.
- </para>
+ </programlisting>
+ </example>
+ <para>
+ Both built-in functions and custom functions have the same syntax in
+ the templates. Built-in functions are the inner workings of Smarty,
+ such as <command>if</command>, <command>section</command> and
+ <command>strip</command>. They cannot be modified. Custom functions are
+ additional functions implemented via plugins. They can be modified to
+ your liking, or you can add new ones. <command>html_options</command> and
+ <command>html_select_date</command> are examples of custom functions.
+ </para>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
@@ -56,4 +56,4 @@
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
--->
\ No newline at end of file
+-->
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-basic-syntax/language-syntax-quotes.xml?r1=1.1&r2=1.2&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.1 \
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.1 Tue \
Apr 13 04:40:21 2004
+++ smarty/docs/en/designers/language-basic-syntax/language-syntax-quotes.xml Sun Apr \
18 13:34:12 2004 @@ -1,16 +1,16 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
- <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.
- </para>
- <example>
- <title>embedded quotes syntax</title>
- <programlisting>
+<!-- $Revision: 1.2 $ -->
+<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.
+ </para>
+ <example>
+ <title>embedded quotes syntax</title>
+ <programlisting>
<![CDATA[
SYNTAX EXAMPLES:
{func var="test $foo test"} <-- sees $foo
@@ -24,8 +24,8 @@
{include file="subdir/$tpl_name.tpl"} <-- will replace $tpl_name with value
{cycle values="one,two,`$smarty.config.myval`"} <-- must have backticks
]]>
- </programlisting>
- </example>
+ </programlisting>
+ </example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
@@ -46,4 +46,4 @@
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
--->
\ No newline at end of file
+-->
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic