CodeIgniter Forums
User Guide errors - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: User Guide errors (/thread-65586.html)



User Guide errors - george--fb - 06-28-2016

There are a few errors in the user guide on this page

Quote:public function view($slug = NULL)
{
       $model = new NewsModel();

       $data['news'] = $model->getNews($slug);

       if (empty($data['news']))
       {
               throw new \CodeIgniter\PageNotFoundException('Cannot page the page: '. $slug);
       }

       $data['title'] = $data['news'][0]['title'];

       echo view('Templates/Header', $data);
       echo view('News/Index', $data);
       echo view('Templates/Footer');
}

<?php
echo '<h2>'.$news['title'].'</h2>';
echo $$news['text'];

page I assume it should be find
[0] shouldn't be there
Index should be View
$ shouldn't be there


RE: User Guide errors - kilishan - 06-28-2016

Thanks for the comments. I have fixed them up in the repo. Not sure how long it will take to show up in the live version.

For future requests - we do accept pull requests for changes. Smile


RE: User Guide errors - ciadmin - 06-28-2016

(06-28-2016, 08:00 PM)kilishan Wrote: Thanks for the comments. I have fixed them up in the repo. Not sure how long it will take to show up in the live version.

For future requests - we do accept pull requests for changes. Smile

Updated the live user guide Undecided


RE: User Guide errors - kilishan - 06-28-2016

Well that was quick! Smile