mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
Separated some template code from php code.
This commit is contained in:
@@ -50,8 +50,13 @@ $smarty->display("file:admin/menu.tpl"); // same as one above
|
|||||||
$smarty->display("file:/export/templates/index.tpl");
|
$smarty->display("file:/export/templates/index.tpl");
|
||||||
$smarty->display("file:/path/to/my/templates/menu.tpl");
|
$smarty->display("file:/path/to/my/templates/menu.tpl");
|
||||||
?>
|
?>
|
||||||
|
]]>
|
||||||
{* from within Smarty template *}
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
And from within Smarty template:
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{include file="file:/usr/local/share/templates/navigation.tpl"}
|
{include file="file:/usr/local/share/templates/navigation.tpl"}
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
@@ -73,8 +78,13 @@ $smarty->display("file:/path/to/my/templates/menu.tpl");
|
|||||||
$smarty->display("file:C:/export/templates/index.tpl");
|
$smarty->display("file:C:/export/templates/index.tpl");
|
||||||
$smarty->display("file:F:/path/to/my/templates/menu.tpl");
|
$smarty->display("file:F:/path/to/my/templates/menu.tpl");
|
||||||
?>
|
?>
|
||||||
|
]]>
|
||||||
{* from within Smarty template *}
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
And from within Smarty template:
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{include file="file:D:/usr/local/share/templates/navigation.tpl"}
|
{include file="file:D:/usr/local/share/templates/navigation.tpl"}
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
@@ -162,8 +172,13 @@ $smarty->register_resource("db", array("db_get_template",
|
|||||||
// using resource from php script
|
// using resource from php script
|
||||||
$smarty->display("db:index.tpl");
|
$smarty->display("db:index.tpl");
|
||||||
?>
|
?>
|
||||||
|
]]>
|
||||||
{* using resource from within Smarty template *}
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
And from within Smarty template:
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{include file="db:/extras/navigation.tpl"}
|
{include file="db:/extras/navigation.tpl"}
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
Reference in New Issue
Block a user