Welcome Guest, Not a member yet? Register   Sign In
Unlikely question...
#1

[eluser]Unknown[/eluser]
I am running codeigniter 2 with Smarty 3.

I am have my site menu running from a library which is called from the smarty file with the header in it.

I want to use the same library function for my admin area so that I can use the same header file. The admin uses a different controller though.

In CI is there a way of working out which controller I have run the page in?

So for example in my library I could put something like:

if(ci_controller == 'admin'){
show admin menu
}else{
show main menu
}

thanks... alternatively I guess this can be worked out with some php...


Messages In This Thread
Unlikely question... - by El Forum - 02-27-2011, 02:43 AM
Unlikely question... - by El Forum - 02-27-2011, 04:33 AM
Unlikely question... - by El Forum - 02-27-2011, 12:18 PM
Unlikely question... - by El Forum - 02-27-2011, 01:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB