Welcome Guest, Not a member yet? Register   Sign In
_remap() acting up
#2

[eluser]mah0001[/eluser]
From Docs: If your controller contains a function named _remap(), it will always get called regardless of what your URI contains. It overrides the normal behavior in which the URI determines which function is called, allowing you to define your own function routing rules.

Try this, you need to handle all cases in the remap:
Code:
function _remap()
    {
        //create
        if($this->uri->segment(3) == "create")
        {
            $this->create();
        }    

        //view
        if($this->uri->segment(3) == "view")
        {
            $this->view();
        }    
        
        //call to the index function
        if($this->uri->segment(3) != "create" && $this->uri->segment(3) != "view" && $this->uri->segment(3) != "update" && is_numeric($this->uri->segment(3)))
        {
            $this->index($this->uri->segment(3),$this->uri->segment(4),$this->uri->segment(5));
        }
        
    }


Messages In This Thread
_remap() acting up - by El Forum - 04-28-2010, 10:30 AM
_remap() acting up - by El Forum - 04-28-2010, 06:03 PM
_remap() acting up - by El Forum - 04-28-2010, 06:51 PM
_remap() acting up - by El Forum - 04-29-2010, 03:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB