[eluser]soup7[/eluser]
i got it working, i can view 'all' news, i can add new articles, but when i click on the 'view article' (to view one news item by itself) i get
404 Page Not Found
The page you requested was not found.
i added the view($slug) to controller (below), and the news 'view' (below also) and updated the routes as directed (also below). any ideas on what may be incorrect? i can view all news but not one by itself...
public function view($slug)
{
$data['news_item'] = $this->news_model->get_news($slug);
if (empty($data['news_item']))
{
show_404();
}
$data['title'] = $data['news_item']['title'];
$this->load->view('templates/header', $data);
$this->load->view('news/view', $data);
$this->load->view('templates/footer');
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<?php
echo '<h2>'.$news_item['title'].'</h2>';
echo $news_item['text'];
?>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
$route['news/(:any)'] = 'news/view/$1';
$route['news'] = 'news';
$route['(:any)'] = 'pages/view/$1';
$route['default_controller'] = 'pages/view';