I'm using the global.php file to give my templates some variables. It works fine everywhere, using the templates with a controller it doesn't. Any idea how I can use the globa variables with a controller too?
Thanks but there seems to be a bug in it. If I'm using $this->load->module_library(FUEL_FOLDER, 'fuel_page', array('location' => '_folder/file')); I get an 404-Error. Using $this->load->module_library(FUEL_FOLDER, 'fuel_page', array('location' => 'folder/file')); everything works. Looks like I can't use a folder beginning with _
That's correct. File names and folders beginning with an underscore aren't viewable if using the "opt-in" controller method or using a controller and the Fuel_page class to render the page
But why? Is there any way to fix this? If I have a view to be used with a controller, I don't want it to be accessible without controller! It gets wo many variables from it, without it was a page full with errors!
To get around this issue, you can try specifying a 'view' variable like so: $this->load->module_library(FUEL_FOLDER, 'fuel_page', array('location' => 'folder/file'));
$this->fuel_page->add_variables(array('view' => '_folder/file'));
$this->fuel_page->render();
Comments
http://www.getfuelcms.com/user_guide/general/creating-pages
$this->load->module_library(FUEL_FOLDER, 'fuel_page', array('location' => '_folder/file'));
I get an 404-Error. Using$this->load->module_library(FUEL_FOLDER, 'fuel_page', array('location' => 'folder/file'));
everything works. Looks like I can't use a folder beginning with _$this->load->module_library(FUEL_FOLDER, 'fuel_page', array('location' => 'folder/file')); $this->fuel_page->add_variables(array('view' => '_folder/file')); $this->fuel_page->render();