[eluser]JamieBarton[/eluser]
Hi guys,
Here is my controller I've just set-up..
Now, I want to be able to go to some of the following URLs, and the appropriate views to show up. Hopefully someone can adjust my controller, and suggestion the Routes too..
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Users extends CI_Controller {
public function index()
{
redirect(base_url());
}
public function view_profile()
{
$this->load->view('users/view_profile');
}
public function attending()
{
$this->load->view('users/attending');
}
public function venues()
{
$this->load->view('users/venues');
}
public function artists()
{
$this->load->view('users/artists');
}
public function friends()
{
$this->load->view('users/friends');
}
public function followers()
{
$this->load->view('users/followers');
}
public function following()
{
$this->load->view('users/following');
}
}
/* End of file users.php */
/* Location: ./application/controllers/users.php */
The route I tried is:
Code:
$route['users/(:any)'] = "users/view_profile/$1";
However.. That would only pass in the username, but what I want to do, is go to the profile, append a method after the username, and get it to work properly..
Can't seem to get my head around how to do this.. Or it's late and I'm being silly..!
Thanks!
J