Two views one controller - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10) +--- Thread: Two views one controller (/showthread.php?tid=62772) |
Two views one controller - snape - 08-24-2015 Hey! I just have one controller:
And two views:
All that i want is to make the Students controller handles all the methods. I dont want to create another controller called Form_studens. So... How can i make the original Students take care of the two views? Is the best practice create a method inside the Students to load the form_students_v page? I should use a helper to load that? Its so confusing to me... Tks RE: Two views one controller - pdthinh - 08-24-2015 (08-24-2015, 05:16 PM)snape Wrote: Hey!One controller can have as many methods as you want. Maybe I show a skeleton: PHP Code: class Students extends CI_Controller You can read more http://www.codeigniter.com/user_guide/general/controllers.html#methods RE: Two views one controller - snape - 08-25-2015 Thks, man. |