Welcome Guest, Not a member yet? Register   Sign In
best practice question
#8

[eluser]Derek Allard[/eluser]
I wrote a good chunk of EE2 when I worked for EllisLab, and the big advantage of using $this->load->view('foo') instead of an include that I saw is that you can then pass view variables into it.

Code:
//controller
$this->load->vars(array('var1'=>'val1', 'var2'=>'val2'));
// and in any view
<?php echo $var2;?>


Messages In This Thread
best practice question - by El Forum - 03-01-2011, 05:14 AM
best practice question - by El Forum - 03-01-2011, 05:28 AM
best practice question - by El Forum - 03-01-2011, 05:35 AM
best practice question - by El Forum - 03-01-2011, 06:27 AM
best practice question - by El Forum - 03-01-2011, 08:20 AM
best practice question - by El Forum - 03-01-2011, 10:13 PM
best practice question - by El Forum - 03-02-2011, 05:41 AM
best practice question - by El Forum - 03-02-2011, 07:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB