mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
Ws
This commit is contained in:
@@ -27,7 +27,7 @@ $smarty->clear_cache(null,"sports");
|
|||||||
$smarty->display('index.tpl',"sports|basketball");
|
$smarty->display('index.tpl',"sports|basketball");
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
<note>
|
<note>
|
||||||
<title>Technical Note</title>
|
<title>Technical Note</title>
|
||||||
@@ -40,7 +40,9 @@ $smarty->display('index.tpl',"sports|basketball");
|
|||||||
caches for the blue theme with clear_cache(null,'themes|blue');
|
caches for the blue theme with clear_cache(null,'themes|blue');
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
</sect1>
|
|
||||||
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@@ -24,7 +24,7 @@ $my_cache_id = $_GET['article_id'];
|
|||||||
$smarty->display('index.tpl',$my_cache_id);
|
$smarty->display('index.tpl',$my_cache_id);
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
<para>
|
<para>
|
||||||
Above, we are passing the variable $my_cache_id to display() as the
|
Above, we are passing the variable $my_cache_id to display() as the
|
||||||
@@ -73,7 +73,7 @@ if(!$smarty->is_cached('index.tpl',$my_cache_id)) {
|
|||||||
$smarty->display('index.tpl',$my_cache_id);
|
$smarty->display('index.tpl',$my_cache_id);
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
<para>
|
<para>
|
||||||
You can clear all caches for a particular cache_id by passing null as the
|
You can clear all caches for a particular cache_id by passing null as the
|
||||||
@@ -95,13 +95,15 @@ $smarty->clear_cache(null,"sports");
|
|||||||
$smarty->display('index.tpl',"sports");
|
$smarty->display('index.tpl',"sports");
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
<para>
|
<para>
|
||||||
In this manner, you can "group" your caches together by giving them the
|
In this manner, you can "group" your caches together by giving them the
|
||||||
same cache_id.
|
same cache_id.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
|
||||||
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@@ -70,7 +70,7 @@ $smarty->cache_lifetime = 30; // 30 seconds
|
|||||||
$smarty->display('home.tpl');
|
$smarty->display('home.tpl');
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
<para>
|
<para>
|
||||||
If <link linkend="variable.compile.check">$compile_check</link> is enabled,
|
If <link linkend="variable.compile.check">$compile_check</link> is enabled,
|
||||||
@@ -93,7 +93,7 @@ $smarty->compile_check = true;
|
|||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
<para>
|
<para>
|
||||||
If <link linkend="variable.force.compile">$force_compile</link> is enabled,
|
If <link linkend="variable.force.compile">$force_compile</link> is enabled,
|
||||||
@@ -127,7 +127,7 @@ if(!$smarty->is_cached('index.tpl')) {
|
|||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
<para>
|
<para>
|
||||||
You can keep parts of a page dynamic with the <link
|
You can keep parts of a page dynamic with the <link
|
||||||
@@ -163,9 +163,11 @@ $smarty->clear_cache('index.tpl');
|
|||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
|
||||||
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
Reference in New Issue
Block a user