Welcome Guest, Not a member yet? Register   Sign In
Problem with Organizing Views in Folders
#4

[eluser]Jamie Rumbelow[/eluser]
You can pass through any variables to any of the views you load by passing through an array of keys as variable names and values as the variable value as the second parameter to the $this->load->view() function. For instance, if you wanted to pass through the $dir_views variable to the parameters/city.php view:

Code:
$dir_views = $this->config->item('dir_views');

$data = array(
    'dir_views' => $dir_views
);
$this->load->view('parameters/city', $data);


Messages In This Thread
Problem with Organizing Views in Folders - by El Forum - 11-04-2009, 05:28 PM
Problem with Organizing Views in Folders - by El Forum - 11-04-2009, 05:32 PM
Problem with Organizing Views in Folders - by El Forum - 11-04-2009, 05:47 PM
Problem with Organizing Views in Folders - by El Forum - 11-04-2009, 06:25 PM
Problem with Organizing Views in Folders - by El Forum - 11-05-2009, 11:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB