Welcome Guest, Not a member yet? Register   Sign In
including files into your views
#1

[eluser]sacarias[/eluser]
In the creation of websites, i usually like to create reusable code, along the lines of: header, footer, sidebar... where do you all suggest i put a folder called includes, and then how would i call those files into my view.

Thank you.
#2

[eluser]adamp1[/eluser]
Why not have a header view a footer view and a sidebar view?

Then in your master view
Code:
$this->load->view('header');
$this->load->view('sidebar');
$this->load->view('footer');
#3

[eluser]sacarias[/eluser]
Thank you for the tips. ill use this. i guess i was trying to consider a little more organization
#4

[eluser]adamp1[/eluser]
That is organisation? Each section is in its own view. You can separate it even more if needed.
#5

[eluser]Mischievous[/eluser]
try a template library http://ellislab.com/forums/viewthread/88452/




Theme © iAndrew 2016 - Forum software by © MyBB