[eluser]elambiguo[/eluser]
Basically....
Code:
<div id=header>
<?php echo $this->load->view($header_data)?>
</div>
<div id=right_column>
<?php echo $this->load->view($right_column_data)?>
</div>
<div id=main>
<?php echo $this->load->view($may_variate)?>
</div>
I thing that this is correct....
In cotroller......
Code:
function index(){
$data["header_data"] = "Tralala" // view for header...
$data["may_variate"] = "Hello" // View for ......
$data["right_column_data"] = "Something" // view for right column....
$this->load->view('layout/layout', $data);
}
Quote:My question is. It's abssolutly necessary to load in every controller the '$data["my_right_column_view_DATA"]' variable?, (What if i have hundreds of controllers? it's not really scalable or maintainable)
Not... you can use one variable session for all....
Only change the variable in the load->view for one $this->userdata
Quote:Maybe one workaround is to let the "my_right_column_view" have a call to my model and load the data from the database, but i don't think that's a good practice.
Is there something that i'm missing? It's possible to have a "data preload" for the right column view? (maybe a trick with hooks?)
You can see the user guide... or the wiki...
Quote:Ps. Sorry for my english, i've lost a lot of practice :red:
Uh.... one more!!! :-)
I hope you help....