Controller name in the view |
[eluser]zovar[/eluser]
Is there a way to get controller name inside the view file? I want to use separate css files depending on what controller loads this view, so I need to know controller's name.
[eluser]Colin Williams[/eluser]
better to use rsegment() because segment() will give you the pre-routed path, which won't necessarily be the controller name.
[eluser]Unknown[/eluser]
What about Code: get_class(get_instance()) The documentation says get_instance() provides the "CodeIgniter super object", but as it turns out, this is the current controller.
[eluser]Otemu[/eluser]
Check out this post here, number of methods how you can achieve loading different css depending on the view this http://ellislab.com/forums/viewthread/233286/
|
Welcome Guest, Not a member yet? Register Sign In |