CodeIgniter Forums
Strange loading of views... - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Strange loading of views... (/thread-42583.html)



Strange loading of views... - El Forum - 06-11-2011

[eluser]Unknown[/eluser]
Hi, I'm quite new to CI, so the question is:

Why, when I'm loading header straight away(header is view of course), it appears under other views, which area loaded after passing 3rd argument to view loader, and then printing them ?

If I make same action for the header view(I mean keeping it in the string and then printing) , it appear above all other views - wanted result.

Thanks Smile


Strange loading of views... - El Forum - 06-11-2011

[eluser]InsiteFX[/eluser]
view: application/views/template.php
Code:
<?php $this->load->view('header');
<?php $this->load->view('body');
<?php $this->load->view('footer');

// Controller
$this->load->view('template', $data);

InsiteFX