One page view |
[eluser]Unknown[/eluser]
Hi! I`m new to CI and I want to start using it in my projects. Now, I want to know if anyone using one file as template (view file)? How I mean it: I want to create (for example) page with next parts: header, left, mid, right, footer. All parts are same for every section/page of site, except "mid" part. How to do this? PS Sorry for bad english
[eluser]Dam1an[/eluser]
The easiest way would be to do something like this View: Code: <body> And then in the controller, get the contents of the main view by setting the 3rd param to true, as follows Code: $data['main'] = $this->load->view('main_content_view', null, true);
[eluser]Colin Williams[/eluser]
Dam1an, what fascinating organ do you possess to come up with these solutions!?
[eluser]Dam1an[/eluser]
[quote author="Colin Williams" date="1246748702"]Dam1an, what fascinating organ do you possess to come up with these solutions!? [/quote] I'd hate to just come out and tell you, so I'll make it fun and let you use your brain at the same time... Lets play hangman! I use my _ _ _ _ _ to come up with these brilliant ideas... Who wants the first guess?
[eluser]Unknown[/eluser]
Thank you Damian, I founded this http://maestric.com/doc/php/codeigniter_template but i think I`m going to use yours. |
Welcome Guest, Not a member yet? Register Sign In |