mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
misc updates
This commit is contained in:
24
docs.sgml
24
docs.sgml
@@ -388,6 +388,12 @@ require_once(SMARTY_DIR."Smarty.class.php");
|
|||||||
from that global array. $SCRIPT_NAME is globally assigned by
|
from that global array. $SCRIPT_NAME is globally assigned by
|
||||||
default from $HTTP_SERVER_VARS.
|
default from $HTTP_SERVER_VARS.
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
TECHNICAL NOTE: Server variables can be accessed through the
|
||||||
|
$smarty variable, such as {$smarty.env.SCRIPT_NAME}. See the
|
||||||
|
section on the <link
|
||||||
|
linkend="builtin.variable.smarty">$smarty</link> variable.
|
||||||
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2 id="setting.undefined">
|
<sect2 id="setting.undefined">
|
||||||
<title>$undefined</title>
|
<title>$undefined</title>
|
||||||
@@ -743,19 +749,6 @@ $smarty->assign(array("city" => "Lincoln","state" => "Nebraska"));
|
|||||||
used by the <link linkend="chapter.debugging.console">debugging
|
used by the <link linkend="chapter.debugging.console">debugging
|
||||||
console</link>, and should probably never be used directly.
|
console</link>, and should probably never be used directly.
|
||||||
</para>
|
</para>
|
||||||
<example>
|
|
||||||
<title>assign_debug_info</title>
|
|
||||||
<programlisting>
|
|
||||||
|
|
||||||
// passing name/value pairs
|
|
||||||
$smarty->assign("Name","Fred");
|
|
||||||
$smarty->assign("Address",$address);
|
|
||||||
|
|
||||||
// passing an associative array
|
|
||||||
$smarty->assign(array("city" => "Lincoln","state" => "Nebraska"));
|
|
||||||
|
|
||||||
</programlisting>
|
|
||||||
</example>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2 id="api.append">
|
<sect2 id="api.append">
|
||||||
<title>append</title>
|
<title>append</title>
|
||||||
@@ -1343,7 +1336,7 @@ var_dump($tpl_vars);
|
|||||||
|
|
||||||
include("Smarty.class.php");
|
include("Smarty.class.php");
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
|
$smarty->caching = true;
|
||||||
|
|
||||||
// only do db calls if cache doesn't exist
|
// only do db calls if cache doesn't exist
|
||||||
if(!$smarty->is_cached("index.tpl"))
|
if(!$smarty->is_cached("index.tpl"))
|
||||||
@@ -1423,6 +1416,7 @@ $smarty->display("db:header.tpl");
|
|||||||
include("Smarty.class.php");
|
include("Smarty.class.php");
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
|
|
||||||
|
$smarty->caching = true;
|
||||||
|
|
||||||
// only do db calls if cache doesn't exist
|
// only do db calls if cache doesn't exist
|
||||||
if(!$smarty->is_cached("index.tpl"))
|
if(!$smarty->is_cached("index.tpl"))
|
||||||
@@ -2063,7 +2057,7 @@ email: zaphod@slartibartfast.com<br>
|
|||||||
properties that are internal variables.
|
properties that are internal variables.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2>
|
<sect2 id="builtin.variable.smarty">
|
||||||
<title>{$smarty} reserved variable</title>
|
<title>{$smarty} reserved variable</title>
|
||||||
<para>
|
<para>
|
||||||
The reserved {$smarty} variable can be used to access several
|
The reserved {$smarty} variable can be used to access several
|
||||||
|
Reference in New Issue
Block a user