mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
Minor changes and corrections
This commit is contained in:
@@ -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
|
||||
|
@@ -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><div></literal> tag in the <literal><head></literal>).
|
||||
|
||||
This means you will need to include the <literal><script></literal> and
|
||||
<literal><div></literal> tags manually.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -121,10 +121,10 @@ smarty [AT] example [DOT] com
|
||||
<link linkend="language.function.mailto">
|
||||
<varname>{mailto}</varname></link></para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
{* email address mangled *}
|
||||
<a href="mailto:{$EmailAddress|escape:'hex'}">{$EmailAddress|escape:'mail'}</a>
|
||||
]]>
|
||||
<![CDATA[
|
||||
{* email address mangled *}
|
||||
<a href="mailto:{$EmailAddress|escape:'hex'}">{$EmailAddress|escape:'mail'}</a>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
|
@@ -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');
|
||||
|
||||
?>
|
||||
|
@@ -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);
|
||||
|
||||
}
|
||||
|
@@ -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']);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
Reference in New Issue
Block a user