One view template, multiple views inside it. - 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: One view template, multiple views inside it. (/showthread.php?tid=39217) |
One view template, multiple views inside it. - El Forum - 03-04-2011 [eluser]Steve Moss[/eluser] Hello, I just downloaded Code Igniter and now I'm learning it. So I already know how to pass data to views and all that. But what I need is create one view that has like multiple views inside it. I've seen some examples with 'header.php', 'footer.php'. But that's not what I need/want for two reasons. 1. I don't like the idea of it. I would rather have one file, for example 'baseView.php'. 2. Header/Footer concept wouldn't work in my case since I need to have something different. What I would like is to have 'baseView.php' that would look something like this: Code: <!DOCTYPE html> Anyway, I hope you understand what I want to do. The reason for that is that I have (for example) and administration panel, I want the side bar, header, footer stay the same, but I need only content division to change based on what I want (for instance add something to DB or delete something from DB). Is that possible, and if it is then how? One view template, multiple views inside it. - El Forum - 03-04-2011 [eluser]InsiteFX[/eluser] Code: <!DOCTYPE html> InsiteFX One view template, multiple views inside it. - El Forum - 03-04-2011 [eluser]R_Nelson[/eluser] check out this video Code: http://net.tutsplus.com/videos/screencasts/codeigniter-from-scratch-day-6/ i just edited my page to do what i want and it works great |