Here Some Urls that a gathered, and i wondered, How to use Codeigniter to active such result, and what are they called?
The big question is how do you organize and think your application to have a similar result?
How to use Codeigniter to active such result? Juat play with these:
_remap()
function in your controllerExample:
exemple.com/movies/action/some-title-that-i-want-to-implement/ (brings a post)
Let say your default controller is home
; then :
config/routes.php:
$route['(:any)'] = 'home/$1'
controller/home.php
class Home extends CI_Controller {
function index()
{
//do somthing
}
public function _remap()
{
//play with uri segment here, i.e:
if ($this->uri->segment(1) == 'movies')
{
//take 'movies' as parameter and use it
}
else
{
//you can be more creative than me
}
}
}
what are they called? I am not sure, I guess 'Virtual URI Mapping'.
how do you organize and think your application to have a similar result? There is no something special.