Minor changes and corrections

This commit is contained in:
pete_morgan
2006-10-09 23:28:03 +00:00
parent a1c55f4b30
commit 0a851225eb
6 changed files with 26 additions and 14 deletions

View File

@@ -8,7 +8,7 @@
<literal>}</literal>, but they can be <link linkend="variable.left.delimiter">changed</link>.
</para>
<para>
For examples, we will assume that you are using the default
For the examples in this manual, 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

View File

@@ -51,6 +51,17 @@
</programlisting>
</example>
<note>
<title>XHTML validation</title>
<para>The <literal>{popup_init}</literal> does not validate with
strict and you will get the error
<literal>document type does not allow element "div" here;</literal>
(ie a <literal>&lt;div&gt;</literal> tag in the <literal>&lt;head&gt;</literal>).
This means you will need to include the <literal>&lt;script&gt;</literal> and
<literal>&lt;div&gt;</literal> tags manually.
</para>
</note>
</sect1>
<!-- Keep this comment at the end of the file

View File

@@ -528,6 +528,9 @@ $smarty->cache_dir = '/web/www.example.com/guestbook/cache/';
$smarty->assign('name','Ned');
//** un-comment the following line to show the debug console
//$smarty->debugging = true;
$smarty->display('index.tpl');
?>

View File

@@ -37,15 +37,15 @@ $smarty->caching = true;
if(!$smarty->is_cached('index.tpl')) {
// dummy up some data
$address = "245 N 50th";
$address = '245 N 50th';
$db_data = array(
"City" => "Lincoln",
"State" => "Nebraska",
"Zip" => "68502"
'City' => 'Lincoln',
'State' => 'Nebraska',
'Zip' => '68502'
);
$smarty->assign("Name","Fred");
$smarty->assign("Address",$address);
$smarty->assign('Name', 'Fred');
$smarty->assign('Address', $address);
$smarty->assign('data', $db_data);
}

View File

@@ -42,9 +42,7 @@ function smarty_insert_time($params, &$smarty)
$smarty->trigger_error("insert time: missing 'format' parameter");
return;
}
$datetime = strftime($params['format']);
return $datetime;
return strftime($params['format']);
}
?>
]]>