layout question - 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: layout question (/showthread.php?tid=53544) |
layout question - El Forum - 07-28-2012 [eluser]cerberus478[/eluser] Hi I want to create a layout for my website, but it doesn't seem to be working. I tried to do it like the tutorial said but I get this error An Error Was Encountered Unable to load the requested file: cms/layout.php How would I be able to link my pages to the layout page Thanks layout question - El Forum - 07-29-2012 [eluser]ojcarga[/eluser] What tutorial are you talking about? also, post the code you are using dude. layout question - El Forum - 07-29-2012 [eluser]cerberus478[/eluser] I'm using the codeigniters user_guide tutorial. I managed to make a layout for the first page but any pages after that it doesn't work. I don't get an error, the layout just doesn't work. My layout.php is Code: <html> my bras controller is Code: <?php layout question - El Forum - 07-29-2012 [eluser]ojcarga[/eluser] Look, don't really understand why, but, what you are trying to do is to load 2 views on the same controller method, that is ok, it is not bad, but why are you doing that? Are you sure "bras/bras.php" and "bras/bras_view.php" both exist? It means you should have this structure of files/folders application -views --bras ---bras.php ---bras_view.php and to access the controller you posted above you should go to: your_site_base_url/bras ---> for accessing the index() method your_site_base_url/bras/bras_view ---> for accessing the bras_view() method. Let me know if we are on the same point, if not, maybe what you need is to review what MVC is. The CI user guide is very useful for having an global understanding of how CI works, so please, read it step by step trying to understand every little piece of code there and come back if you don't understand something |