Problem with Organizing Views in Folders

Hi guys
I'm having a little problem trying to organize views in subfolders.
I've created (and divided) the views in:


Then I've a view file stored in

And in the view file, I have:

but I'm getting the following

Severity: Warning
Message: include(../inc_cabecera.php) [function.include]: failed to open stream: No such file or directory
Filename: parameters/city.php
Line Number: 2

Thanks a lot in advance for any tip you can give me


[quote author="n0xie" date="1257399141"]

worked great!, but got another problem
In the file views/inc_header.php I had the following:

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

and I can't use or reference to $dir_views in the file: views/parameters/city.php (I get an error). I've fixed this temporarily by copying the above line of code to each view...


[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:

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

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

That's a better way Jamie
Thanks to Everyone

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.