more tweaks

This commit is contained in:
pete_morgan
2006-02-18 13:43:35 +00:00
parent aabfda3c63
commit d6c762d729
4 changed files with 11 additions and 6 deletions

View File

@@ -40,6 +40,7 @@ $smarty = new Smarty;
$smarty->left_delimiter = '<!--{';
$smarty->right_delimiter = '}-->';
$smarty->assign('foo', 'bar');
$smarty->assign('name', 'Albert');
$smarty->display('example.tpl');
?>
@@ -50,6 +51,7 @@ $smarty->display('example.tpl');
</para>
<programlisting>
<![CDATA[
Welcome <!--{$name}--> to Smarty
<script language="javascript">
var foo = <!--{$foo}-->;
function dosomething() {

View File

@@ -11,8 +11,9 @@
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>,
Some attributes require boolean values (true or false). These
<link linkend="variable.config.booleanize">can be specified</link>
as either unquoted <literal>true</literal>,
<literal>on</literal>, and <literal>yes</literal>, or
<literal>false</literal>, <literal>off</literal>, and
<literal>no</literal>.

View File

@@ -6,10 +6,10 @@
Template comments are surrounded by asterisks, and that is surrounded
by the
<link linkend="variable.left.delimiter"> delimiter</link>
tags like so: {* this is a comment *}
tags like so: <emphasis>{* this is a comment *}</emphasis>
Smarty comments are NOT displayed in the final output of the template,
unlike &lt;!-- HTML comments --&gt;
They are useful for making internal notes in the templates.
and are useful for making internal notes in the templates.
</para>
<example>
<title>Comments</title>
@@ -24,7 +24,7 @@
*}
{* include the header file here *}
{include file="header.tpl"}
{include file='header.tpl'}
{* Dev note: $includeFile is assigned in foo.php script *}
@@ -39,6 +39,7 @@
{html_options options=$vals selected=$selected_id}
</select>
*}
</body>
]]>
</programlisting>

View File

@@ -8,7 +8,8 @@
<link linkend="language.syntax.variables">variables</link>
embedded in double quotes so long as the variable name contains only numbers,
letters, underscores and brackets []. With any other characters (period,
object reference, etc.) the variable must be surrounded by backticks. You
object reference, etc.) the variable must be surrounded by
<link linkend="language.syntax.quotes">backticks</link>. You
cannot embed
<link linkend="language.modifiers">modifiers</link>,
they must always be applied outside of quotes.