diff options
author | Ahmad Anbar <aanbar@gmail.com> | 2015-01-11 18:39:06 +0100 |
---|---|---|
committer | Ahmad Anbar <aanbar@gmail.com> | 2015-01-11 18:39:06 +0100 |
commit | c8e1de74b139dc7f3e776f7ebf98495ec5b780a6 (patch) | |
tree | 51709a1855d570ba495d81a172a029015341c2bd /user_guide_src/source/tutorial/news_section.rst | |
parent | faa4890addbaa90254ef160813a08f727d069415 (diff) | |
parent | 99f31e76bd06876cd3bf789f9d2774f79818b7df (diff) |
Merge remote-tracking branch 'upstream/develop' into develop
Diffstat (limited to 'user_guide_src/source/tutorial/news_section.rst')
-rw-r--r-- | user_guide_src/source/tutorial/news_section.rst | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/user_guide_src/source/tutorial/news_section.rst b/user_guide_src/source/tutorial/news_section.rst index ad9ed41d3..80938de32 100644 --- a/user_guide_src/source/tutorial/news_section.rst +++ b/user_guide_src/source/tutorial/news_section.rst @@ -143,13 +143,15 @@ and add the next piece of code. :: + <h2><?php echo $title ?></h2> + <?php foreach ($news as $news_item): ?> - <h2><?php echo $news_item['title'] ?></h2> + <h3><?php echo $news_item['title'] ?></h3> <div class="main"> <?php echo $news_item['text'] ?> </div> - <p><a href="<?php echo $news_item['slug'] ?>">View article</a></p> + <p><a href="news/<?php echo $news_item['slug'] ?>">View article</a></p> <?php endforeach ?> @@ -196,7 +198,7 @@ The only things left to do is create the corresponding view at Routing ------- -Because of the wildcard routing rule created earlier, you need need an +Because of the wildcard routing rule created earlier, you need an extra route to view the controller that you just made. Modify your routing file (application/config/routes.php) so it looks as follows. This makes sure the requests reaches the news controller instead of |