Welcome Guest, Not a member yet? Register   Sign In
Displaying views concerning to url from function uri
#1

[eluser]Unknown[/eluser]
Hello, I just started with CI and i can't get it how to simple make display views not to overloading the controller file.

I have a controller admin.php it loads views: main.php which loads header content and footer
now i have url something like this http://domain.com/index.php/admin and it displays index content view. let's say I want to display products adding page then I load url http://domain.com/index.php/admin/product_add and if i want to load view in content area i should call function $thi->load->view('product_add') but to do this I have to put function product_add() in main controller admin.php and if i'll have a lot of pages the controller will be overloaded with functions to load view.

In pure php i simple use switch() in paging how to do it simple with CI ?

I mean how to simply organize administration panel to load views from one controller?




Theme © iAndrew 2016 - Forum software by © MyBB