Parser Library |
[eluser]jurlan[/eluser]
Hi all, is it possible to also load view files within a template view file? my template.php file contains navigation and there's 1 section that changes accordingly to the link clicked. So I don't only need to pars {title} and stuff, but also the view file belonging to the link. Thanks in advance!
[eluser]PhilTem[/eluser]
Yes, this is possible. You can have lines like this in any of your views Code: $this->load->view('another/view'); though you need to be careful because of possible changes in the scope of $this. It's actually better to load your views in the controller and assign the "sub"-views a variable which will just be echoed in your view: controller: Code: $sub_view = $this->load->view('path/to/sub/view', NULL, TRUE); path/to/main/view: Code: // all your other code here
[eluser]jurlan[/eluser]
I just came across this: http://www.jenssegers.be/blog/25/Codeign...te-library Think I might give it a shot... |
Welcome Guest, Not a member yet? Register Sign In |