Welcome Guest, Not a member yet? Register   Sign In
Blog - Can't Identify the Controller
#1

[eluser]Unknown[/eluser]
I'm in the middle of making a blog. When the user clicks on the individual blog title they are rerouted to http://mysite.com/3/some-title-goes-here. The problem is that I don't know how to get this to load the blog_post() function in my controller. What step am I missing?

Code:
public function index()
{
  $this->load->model('Writing_Model');
  
  $data['blog_posts']  = $this->Writing_Model->get_blog_posts();

  $this->template->display('writing/writing', $data);
}

public function blog_post()
{
  $this->load->model('Writing_Model');
  
  $data['blog_post']  = $this->Writing_Model->get_blog_post(1);
  
  $this->template->display('writing/comments', $data);
  
  echo 'testing';
}




Theme © iAndrew 2016 - Forum software by © MyBB