Renamed introduction to index and small code style fixes (patch by @ericbarnes).
diff --git a/user_guide/tutorial/static_pages.html b/user_guide/tutorial/static_pages.html
index bf52f45..51a04c6 100644
--- a/user_guide/tutorial/static_pages.html
+++ b/user_guide/tutorial/static_pages.html
@@ -42,7 +42,7 @@
<td id="breadcrumb">
<a href="http://codeigniter.com/">CodeIgniter Home</a> ›
<a href="../index.html">User Guide Home</a> ›
-<a href="introduction.html">Tutorial</a> ›
+<a href="index.html">Tutorial</a> ›
Static pages
</td>
<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td>
@@ -79,7 +79,7 @@
class Pages extends CI_Controller {
- function view($page = 'home')
+ public function view($page = 'home')
{
}
@@ -134,10 +134,10 @@
<p>In order to load those pages, you'll have to check whether the requested page actually exists:</p>
<pre>
-function view($page = 'home')
+public function view($page = 'home')
{
- if ( ! file_exists('application/views/pages/' . $page . '.php'))
+ if ( ! file_exists('application/views/pages/'.$page.'.php'))
{
// Whoops, we don't have a page for that!
show_404();
@@ -146,10 +146,10 @@
$data['title'] = ucfirst($page); // Capitalize the first letter
$this->load->view('templates/header', $data);
- $this->load->view('pages/' . $page, $data);
+ $this->load->view('pages/'.$page, $data);
$this->load->view('templates/footer', $data);
-
-}
+
+}
</pre>
<p>Now, when the page does exist, it is loaded, including the header and footer, and displayed to the user. If the page doesn't exist, a "404 Page not found" error is shown.</p>
@@ -193,7 +193,7 @@
<div id="footer">
<p>
-Previous Topic: <a href="introduction.html">Introduction</a>
+Previous Topic: <a href="index.html">Introduction</a>
·
<a href="#top">Top of Page</a> ·
<a href="../index.html">User Guide Home</a> ·