From d4835d1dcaaa7d3a4690d36c245f311c6b68e66d Mon Sep 17 00:00:00 2001 From: pete_morgan Date: Sat, 2 Dec 2006 22:20:09 +0000 Subject: [PATCH] Tidy example, speeling andd add links --- .../language-function-include-php.xml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/en/designers/language-builtin-functions/language-function-include-php.xml b/docs/en/designers/language-builtin-functions/language-function-include-php.xml index 0acef7d7..473044e2 100644 --- a/docs/en/designers/language-builtin-functions/language-function-include-php.xml +++ b/docs/en/designers/language-builtin-functions/language-function-include-php.xml @@ -90,36 +90,38 @@ function {include_php} - The load_nav.php template. + The load_nav.php file: query('select * from site_nav_sections order by name',SQL_ALL); -$this->assign('sections',$sql->record); +require_once('database.class.php'); +$db = new Db(); +$db->query('select url, name from navigation order by name'); +$this->assign('navigation', $db->getRows()); ?> ]]> - Where the teamplate is: + where the template is: {$curr_section.name}
+{foreach item='nav' from=$navigation} + {$nav.name}
{/foreach} ]]>
See also {include}, + $security, +$trusted_dir, {php}, {capture}, template resources and