From 40119eab739b3a3ba94a01be3665057dbd77c15b Mon Sep 17 00:00:00 2001 From: freespace Date: Thu, 25 Nov 2004 23:01:07 +0000 Subject: [PATCH] Separated some template code from php code. --- .../advanced-features/template-resources.xml | 35 +++++++++++++------ 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/docs/en/programmers/advanced-features/template-resources.xml b/docs/en/programmers/advanced-features/template-resources.xml index 59ff40fa..d8fb831a 100644 --- a/docs/en/programmers/advanced-features/template-resources.xml +++ b/docs/en/programmers/advanced-features/template-resources.xml @@ -50,11 +50,16 @@ $smarty->display("file:admin/menu.tpl"); // same as one above $smarty->display("file:/export/templates/index.tpl"); $smarty->display("file:/path/to/my/templates/menu.tpl"); ?> - -{* from within Smarty template *} +]]> + + + And from within Smarty template: + + + - + @@ -73,8 +78,13 @@ $smarty->display("file:/path/to/my/templates/menu.tpl"); $smarty->display("file:C:/export/templates/index.tpl"); $smarty->display("file:F:/path/to/my/templates/menu.tpl"); ?> - -{* from within Smarty template *} +]]> + + + And from within Smarty template: + + + @@ -162,11 +172,16 @@ $smarty->register_resource("db", array("db_get_template", // using resource from php script $smarty->display("db:index.tpl"); ?> - -{* using resource from within Smarty template *} +]]> + + + And from within Smarty template: + + + - + @@ -205,10 +220,10 @@ function make_template ($resource_type, $resource_name, &$template_source, &$tem $smarty->default_template_handler_func = 'make_template'; ?> ]]> - + - +