CodeIgniter Forums
can ci do like this? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: can ci do like this? (/showthread.php?tid=32488)



can ci do like this? - El Forum - 07-25-2010

[eluser]huuray[/eluser]
in basecamp,their link look like this

http://test.basecamphq.com/projects/4113207/milestones/13256077

can i do the same in ci?
what im doing now something like http://url/controller/function/id


can ci do like this? - El Forum - 07-25-2010

[eluser]Twisted1919[/eluser]
Of course you can .
You have two options : ROUTES AND REMAP .
For this, i would suggest remap .
here is an example :
Code:
class Projects extends Controller{

   function _remap($method)
   {
      //map every request to index .
      $this->index();
   }

   // projects/1000/milestones/20000
   function index($project_id='',$something='milestones',$something_id='')
   {
     //Process here based on the uri params .
   }

}



can ci do like this? - El Forum - 07-25-2010

[eluser]huuray[/eluser]
ok,thanks.
i'll give it a try.