about header and footer - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: about header and footer (/showthread.php?tid=23844) |
about header and footer - El Forum - 10-23-2009 [eluser]revanth[/eluser] Hi all I am new to codeigniter and i am in learning stage I have some doubt in the controller. I am having header,leftsidelinks and footer in my proj which is in MVC architecture and i placed my header page in the controller constructor and when i am placing my leftsidelinks in controller i am getting error, for this i placed it in another function as leftlinks() in the controller in that i am loading the modal and the data for this one is getting from the modalfunction and for this how can i call the controller function in the indexview page of my proj about header and footer - El Forum - 10-23-2009 [eluser]daparky[/eluser] What is the exact error message? about header and footer - El Forum - 10-23-2009 [eluser]Michael Wales[/eluser] Your header, footer, etc. should all be views. HTML goes in views. Your controller will then call all of these views in the correct order or a master layout view that then calls these views (my preferred method - explain in code below). controllers/posts.php Code: function index() { views/layout.php Code: <?php |