From a1c55f4b30245662a62fcc8db3aa9dfe05584c1c Mon Sep 17 00:00:00 2001 From: pete_morgan Date: Mon, 9 Oct 2006 22:50:41 +0000 Subject: [PATCH] Minor formatting and error correction --- docs/en/designers/language-basic-syntax.xml | 6 +-- .../language-syntax-attributes.xml | 2 +- .../language-syntax-comments.xml | 27 ++++++++-- .../language-syntax-quotes.xml | 54 ++++++++++++++----- .../designers/language-builtin-functions.xml | 10 ++-- .../language-modifier-escape.xml | 39 +++++++------- 6 files changed, 94 insertions(+), 44 deletions(-) diff --git a/docs/en/designers/language-basic-syntax.xml b/docs/en/designers/language-basic-syntax.xml index e0d2e40b..6919e6fa 100644 --- a/docs/en/designers/language-basic-syntax.xml +++ b/docs/en/designers/language-basic-syntax.xml @@ -4,11 +4,11 @@ Basic Syntax All Smarty template tags are enclosed within delimiters. By - default, these delimiters are { and + default these are { and }, but they can be changed. - For these examples, we will assume that you are using the default + For examples, we will assume that you are using the default delimiters. In Smarty, all content outside of delimiters is displayed as static content, or unchanged. When Smarty encounters template tags, it attempts to interpret them, and displays the appropriate output in their @@ -22,7 +22,7 @@ &designers.language-basic-syntax.language-syntax-quotes; &designers.language-basic-syntax.language-math; &designers.language-basic-syntax.language-escaping; - + +{* $affiliate|upper *} + +{* you cannot nest comments *} +{* + +*} + + {* cvs tag for a template, below the 36 SHOULD be an american currency . however its converted in cvs.. *} {* $Id: Exp $ *} diff --git a/docs/en/designers/language-basic-syntax/language-syntax-quotes.xml b/docs/en/designers/language-basic-syntax/language-syntax-quotes.xml index d5385718..167cc8a0 100644 --- a/docs/en/designers/language-basic-syntax/language-syntax-quotes.xml +++ b/docs/en/designers/language-basic-syntax/language-syntax-quotes.xml @@ -2,24 +2,35 @@ Embedding Vars in Double Quotes + + + Smarty will recognize assigned variables - embedded in double quotes so long as the variable name contains only numbers, - letters, underscores and brackets[] - (see naming). - With any other characters (period, - object reference, etc.) the variable must be surrounded by - `backticks`. You cannot embed + embedded in "double quotes" so long as the variable name contains only numbers, + letters, under_scores and brackets[]. + See naming + for more detail. + + + + With any other characters, for example a .period or + $object>reference, then the variable must be + surrounded by `backticks`. + + + You cannot embed modifiers, they must always be applied outside of quotes. - + + + - embedded quotes syntax + Syntax examples + + -PRACTICAL EXAMPLES: -{include file="subdir/$tpl_name.tpl"} <-- will replace $tpl_name with value -{cycle values="one,two,`$smarty.config.myval`"} <-- must have backticks + + Practical examples + + + See also escape. diff --git a/docs/en/designers/language-builtin-functions.xml b/docs/en/designers/language-builtin-functions.xml index 27c27489..bbae73a1 100644 --- a/docs/en/designers/language-builtin-functions.xml +++ b/docs/en/designers/language-builtin-functions.xml @@ -7,12 +7,12 @@ are the integral part of the smarty template engine. You cannot create your own custom functions with the same name; and you should not need to - modify the built-in functions. - + modify the built-in functions. + - A few on these functions have an assign - attribute which collects the result the function to a named - variable within a template instead of being output; + A few of these functions have an assign + attribute which collects the result the function to a named template + variable instead of being output; much like the {assign} function. diff --git a/docs/en/designers/language-modifiers/language-modifier-escape.xml b/docs/en/designers/language-modifiers/language-modifier-escape.xml index 06e6b44a..f68f4467 100644 --- a/docs/en/designers/language-modifiers/language-modifier-escape.xml +++ b/docs/en/designers/language-modifiers/language-modifier-escape.xml @@ -3,11 +3,11 @@ escape - This is used to encode/escape a variable to html, + escape is used to encode or escape a variable to for example html, url, single quotes, hex, hexentity, javascript and mail. - By default its html escaped. + By default its html. @@ -73,37 +73,36 @@ $smarty->assign('EmailAddress','smarty@example.com'); ]]> - Where template is: + These are example escape template lines followed by the output *} +'Stiff Opposition Expected to Casketless Funeral Plan' + {$articleTitle|escape:'htmlall'} {* escapes ALL html entities *} -{$articleTitle|escape:'url'} +'Stiff Opposition Expected to Casketless Funeral Plan' + +click here +click here + {$articleTitle|escape:'quotes'} +\'Stiff Opposition Expected to Casketless Funeral Plan\' + {$EmailAddress|escape:"hexentity"} {$EmailAddress|escape:'mail'} {* this converts to email to text *} +bob..snip..et + {'mail@example.com'|escape:'mail'} +smarty [AT] example [DOT] com ]]> - - Will output: - - -bob..snip..et -smarty [AT] example [DOT] com -mail [AT] example [DOT] com -]]> -