load layout in controller
FUEL 0.93
I'm having trouble getting the correct layout to load. This works fine in another website that I've created.
# I have a "main" layout for normal pages and a layout named "home" for the home page..
# I've also created a controller called home and I created a page in the CMS called "Home"..
# my default controller is set to Home...
Home Controller {
$vars = array();
$page_init = array('location' => 'Home');
$this->load->module_library(FUEL_FOLDER, 'fuel_page', $page_init);
$this->fuel_page->add_variables($vars);
$this->fuel_page->render();
problem is.. it loads the "main" layout.. even in the CMS it's set to the "Home" layout.. is there a way to pass the layout through the controller?
I tried:
$page_init = array('location' => 'Home', 'layout' => 'home');
Comments
$page_init = array('location' => 'Home','render_mode' => 'cms');