Welcome Guest, Not a member yet? Register   Sign In
Determining Index v. Non-Index
#1

[eluser]netricate[/eluser]
I'm wondering if there is a more succinct way of determining if I am about the fire the index method than I am using. Currently, I have a couple checks in the class declarations that I don't want to fire if the index method is being called.

Code:
class A extends Controller {
    
    function A()
    {
        parent::Controller();
        $this->load->helper('url');
        
        if(!in_array($this->uri->uri_string(),array('/a','/a/')))  //check to make sure this is NOT the index page
        {
            //do things
        }
    }
}

Any suggestions?


Messages In This Thread
Determining Index v. Non-Index - by El Forum - 04-18-2010, 08:30 AM
Determining Index v. Non-Index - by El Forum - 04-18-2010, 08:41 AM
Determining Index v. Non-Index - by El Forum - 04-18-2010, 08:45 AM
Determining Index v. Non-Index - by El Forum - 04-18-2010, 09:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB