Starting out with Fuel Question

edited January 2013 in Bug Reports
So I just started out with Fuel (opted to go with V1.0 after reading some of the forum threads, and I'm pretty new to CI). But I'm having some trouble creating my first static page.

I've been following a tutorial from http://phpmaster.com/getting-started-with-fuel-cms-1/
and been user the new user guide for 1.0, but every time I try load "http://localhost/fuel/hello" I get an error saying "Unable to load the requested class: fuel_page"

Is there something changed in v1.0 that I must follow? I saw the new render format and tried
"$this->fuel->pages->render('hello', $vars);" but that didn't work either.

In fuel/application/controllers/hello.php I have:
class Hello extends CI_Controller {

public function __construct()
{
parent::__construct();
}

public function index()
{
// load the fuel_page library class and pass
// it the view file you want to load
$this->load->module_library(
FUEL_FOLDER,
'fuel_page',
array('location' => 'hello')
);
$this->fuel_page->render();
}
}


In _variables/hello.php i have:
$vars['layout'] = 'none';


In the views folder, as hello.php I have
echo 'Hello Fuel CMS!';

Comments

  • edited 5:02AM
    And I have the <?php tags, just removed for simplicity.
  • edited January 2013
    For FUEL v1.0, try the following:
    public function index() { $vars = array();// array of variables to pass the view... not required, just for demo $this->fuel->pages->render('hello', $vars); }
  • edited 5:02AM
    Thanks for the quick reply.

    It worked!

    Is the loading of the Fuel_pages library not needed anymore?
  • edited 5:02AM
    It is done automatically with $this->fuel->pages. The fuel object handles auto loading of a lot of libraries. The page "The FUEL Object Structure" in the user guide talks about that a little more.
Sign In or Register to comment.