Tutorial for CI 3 - news section - bug found |
In the tutorial at creation of application/views/news/index.php (on http://www.codeigniter.com/user_guide/tu...ction.html) is a detail missing.
The line <p><a href="<?php echo $news_item['slug'] ?>">View article</a></p> does not work, because the created link is only the slug, but it must be news/slug. The following change corrects the issue (and was also part of the documentation for CI 2). <p><a href="news/<?php echo $news_item['slug'] ?>">View article</a></p> Can anyone confirm this? Thanks PBI
There's a routes section at the end of that page and you need to complete it.
08-20-2015, 01:13 PM
(This post was last modified: 08-20-2015, 01:39 PM by Carpintonto. Edit Reason: misstated db error )
A separate issue in the same section -
Seems the documentation/tutorial is just a bit behind the code version 3 Where the sql example Code: CREATE TABLE news ( the example News_model.php will actually look for table CodeIgniternews because application/config/database.php now has Quote:'dbprefix' => 'CodeIgniter', //line # 72 instead of an empty string for dbprefix. For my first run through, I am modifying the code to work with the tutorial. (08-20-2015, 01:13 PM)Carpintonto Wrote: A separate issue in the same section - That prefix is never suggested by the tutorial. |
Welcome Guest, Not a member yet? Register Sign In |