summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/tutorial/news_section.rst
diff options
context:
space:
mode:
authorDaniel Hunsaker <danhunsaker@gmail.com>2013-02-22 21:49:33 +0100
committerDaniel Hunsaker <danhunsaker@gmail.com>2013-02-22 21:49:33 +0100
commit44a6d1da2be916fe0f23a3ea4d5fcb391d7f65dd (patch)
tree31549ebf6ea5ea98e4347eb640d1caa685316f3e /user_guide_src/source/tutorial/news_section.rst
parent353f9834adf3f44c6c7a0f924089bb2b43360404 (diff)
parenteb291c1d1e1116a4420fa30e587adeea0451eeb7 (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into feature/exit-status
Diffstat (limited to 'user_guide_src/source/tutorial/news_section.rst')
-rw-r--r--user_guide_src/source/tutorial/news_section.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/user_guide_src/source/tutorial/news_section.rst b/user_guide_src/source/tutorial/news_section.rst
index b64ea2aae..d7754e9f3 100644
--- a/user_guide_src/source/tutorial/news_section.rst
+++ b/user_guide_src/source/tutorial/news_section.rst
@@ -68,7 +68,7 @@ following code to your model.
$query = $this->db->get('news');
return $query->result_array();
}
-
+
$query = $this->db->get_where('news', array('slug' => $slug));
return $query->row_array();
}
@@ -146,7 +146,7 @@ and add the next piece of code.
<?php foreach ($news as $news_item): ?>
<h2><?php echo $news_item['title'] ?></h2>
- <div id="main">
+ <div class="main">
<?php echo $news_item['text'] ?>
</div>
<p><a href="<?php echo $news_item['slug'] ?>">View article</a></p>
@@ -162,7 +162,7 @@ The news overview page is now done, but a page to display individual
news items is still absent. The model created earlier is made in such
way that it can easily be used for this functionality. You only need to
add some code to the controller and create a new view. Go back to the
-news controller and add the following lines to the file.
+news controller and update ``view()`` with the following:
::
@@ -211,4 +211,4 @@ a slug to the view method in the news controller.
$route['default_controller'] = 'pages/view';
Point your browser to your document root, followed by index.php/news and
-watch your news page. \ No newline at end of file
+watch your news page.