Welcome Guest, Not a member yet? Register   Sign In
How to check if you're in a controller subfolder?
#2

[eluser]PhilTem[/eluser]
This undocumented function in CI::Router should help you:

Code:
/**
* Fetch the sub-directory (if any) that contains the requested controller class
*
* @access public
* @return string
*/
function fetch_directory()
{
    return $this->directory;
}

At least it works for me getting the directory - even though I think it doesn't work properly with @wiredesignz HMVC, but I might be wrong with that one.


Messages In This Thread
How to check if you're in a controller subfolder? - by El Forum - 05-22-2012, 08:12 AM
How to check if you're in a controller subfolder? - by El Forum - 05-22-2012, 08:52 AM
How to check if you're in a controller subfolder? - by El Forum - 05-22-2012, 09:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB