CodeIgniter Forums
Newbie: Advice Please a on Best Practices for Creating Views - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Newbie: Advice Please a on Best Practices for Creating Views (/showthread.php?tid=45605)



Newbie: Advice Please a on Best Practices for Creating Views - El Forum - 09-27-2011

[eluser]vincej[/eluser]
Hi - I'm building a site at the same time as learning CI. I have a a view called Page which presents a variety of differing page contents through a variable $content.

In addition I need to present on the same page a small login form which I have built in a separate view: login.php


Question: is it acceptable or bad practice to use the this->load->view('login')inside the page view ?

OR MUST I create a new function within the welcome controller and call it through the function?

My way works but is it could be acceptable practice ???


Many Thanks !