mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34: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>.
|
<literal>}</literal>, but they can be <link linkend="variable.left.delimiter">changed</link>.
|
||||||
</para>
|
</para>
|
||||||
<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
|
delimiters. In Smarty, all content outside of delimiters is displayed as
|
||||||
static content, or unchanged. When Smarty encounters template tags, it
|
static content, or unchanged. When Smarty encounters template tags, it
|
||||||
attempts to interpret them, and displays the appropriate output in their
|
attempts to interpret them, and displays the appropriate output in their
|
||||||
|
@@ -51,6 +51,17 @@
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</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>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -528,6 +528,9 @@ $smarty->cache_dir = '/web/www.example.com/guestbook/cache/';
|
|||||||
|
|
||||||
$smarty->assign('name','Ned');
|
$smarty->assign('name','Ned');
|
||||||
|
|
||||||
|
//** un-comment the following line to show the debug console
|
||||||
|
//$smarty->debugging = true;
|
||||||
|
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@@ -37,15 +37,15 @@ $smarty->caching = true;
|
|||||||
if(!$smarty->is_cached('index.tpl')) {
|
if(!$smarty->is_cached('index.tpl')) {
|
||||||
|
|
||||||
// dummy up some data
|
// dummy up some data
|
||||||
$address = "245 N 50th";
|
$address = '245 N 50th';
|
||||||
$db_data = array(
|
$db_data = array(
|
||||||
"City" => "Lincoln",
|
'City' => 'Lincoln',
|
||||||
"State" => "Nebraska",
|
'State' => 'Nebraska',
|
||||||
"Zip" => "68502"
|
'Zip' => '68502'
|
||||||
);
|
);
|
||||||
|
|
||||||
$smarty->assign("Name","Fred");
|
$smarty->assign('Name', 'Fred');
|
||||||
$smarty->assign("Address",$address);
|
$smarty->assign('Address', $address);
|
||||||
$smarty->assign('data', $db_data);
|
$smarty->assign('data', $db_data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -42,9 +42,7 @@ function smarty_insert_time($params, &$smarty)
|
|||||||
$smarty->trigger_error("insert time: missing 'format' parameter");
|
$smarty->trigger_error("insert time: missing 'format' parameter");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
return strftime($params['format']);
|
||||||
$datetime = strftime($params['format']);
|
|
||||||
return $datetime;
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
|
Reference in New Issue
Block a user