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

[eluser]Unknown[/eluser]
Hello!
Is there any "clean" way to check if you're in a controller subfolder?

On one of my websites you have the following structure:

controllers / products
controllers / admin /
controllers / admin / products

I know I can check it through URI segment, but I don't believe this is a good way to do this, once in some of the environments that the system runs it is in a subfolder, so the uri segment would vary.

I tried also using the router object, using the fetch_class method, but it'll return just the controller name itself (products for controllers / products and also for controllers / admin / products).

Can you guys help me out?

Thanks!


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