Welcome Guest, Not a member yet? Register   Sign In
Place Directory URLs: Route or Remap?
#5

[eluser]fesweb[/eluser]
Hi,
If it's not too late, you should probably avoid routes if you can.

Remap the controller this way:
Code:
function _remap($method)
    {
        if (method_exists($this, $method))
        {
            $this->$method();
        }
        else
        {
            $this->handler();
        }
    }

function handler()
       {
             // do whatever you need to do here
             $this->my_library->get_stuff($this->uri->segment(2), $this->uri->segment(3));
       }
function add() { // add code }
function edit() { // edit code }
function delete() { // delete code }
Something like that should do it.

Good luck.


Messages In This Thread
Place Directory URLs: Route or Remap? - by El Forum - 08-18-2009, 01:04 PM
Place Directory URLs: Route or Remap? - by El Forum - 08-19-2009, 02:07 AM
Place Directory URLs: Route or Remap? - by El Forum - 08-19-2009, 04:47 AM
Place Directory URLs: Route or Remap? - by El Forum - 08-19-2009, 06:08 AM
Place Directory URLs: Route or Remap? - by El Forum - 08-20-2009, 06:12 PM
Place Directory URLs: Route or Remap? - by El Forum - 08-20-2009, 06:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB