cvs: smarty /docs/en/designers/language-builtin-functions language-function-include-php.xml

[email protected] ("Peter 'Mash' Morgan") Sat, 02 Dec 2006 22:20:10 -0000
Newsgroups php.smarty.cvs
Message-ID <cvspete_morgan1165098009@cvsserver>
pete_morgan		Sat Dec  2 22:20:10 2006 UTC

  Modified files:              
    /smarty/docs/en/designers/language-builtin-functions	
                                                        	language-function-include-php.xml 
  Log:
  Tidy example, speeling andd add links
  
http://cvs.php.net/viewvc.cgi/smarty/docs/en/designers/language-builtin-functions/language-function-include-php.xml?r1=1.11&r2=1.12&diff_format=u
Index: smarty/docs/en/designers/language-builtin-functions/language-function-include-php.xml
diff -u smarty/docs/en/designers/language-builtin-functions/language-function-include-php.xml:1.11 smarty/docs/en/designers/language-builtin-functions/language-function-include-php.xml:1.12
--- smarty/docs/en/designers/language-builtin-functions/language-function-include-php.xml:1.11	Mon Sep 25 21:47:31 2006
+++ smarty/docs/en/designers/language-builtin-functions/language-function-include-php.xml	Sat Dec  2 22:20:09 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.11 $ -->
+<!-- $Revision: 1.12 $ -->
 <sect1 id="language.function.include.php">
  <title>{include_php}</title>
   <note>
@@ -90,36 +90,38 @@
  </para>
  <example>
   <title>function {include_php}</title>
-  <para>The <filename>load_nav.php</filename> template.</para>
+  <para>The <filename>load_nav.php</filename> file:</para>
   <programlisting role="php">
 <![CDATA[
 <?php
 
 // load in variables from a mysql db and assign them to the template
-require_once('MySQL.class.php');
-$sql = new MySQL;
-$sql->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());
 
 ?>
 ]]>
   </programlisting>
   <para>
-   Where the teamplate is:
+   where the template is:
   </para>
   <programlisting>
 <![CDATA[
 {* absolute path, or relative to $trusted_dir *}
 {include_php file='/path/to/load_nav.php'}
 
-{foreach item='curr_section' from=$sections}
-  <a href="{$curr_section.url}">{$curr_section.name}</a><br />
+{foreach item='nav' from=$navigation}
+  <a href="{$nav.url}">{$nav.name}</a><br />
 {/foreach}
 ]]>
   </programlisting>
  </example>
  <para>
   See also <link linkend="language.function.include"><varname>{include}</varname></link>,
+  <link linkend="variable.security"><parameter>$security</parameter></link>,
+<link linkend="variable.trusted.dir"><parameter>$trusted_dir</parameter></link>,
   <link linkend="language.function.php"><varname>{php}</varname></link>, <link
   linkend="language.function.capture"><varname>{capture}</varname></link>, <link
   linkend="template.resources">template resources</link> and <link