Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
view problem
  • hi all,i have no error when using old fuel.
    but when upgrade to to rc2, i change from
    $this->output = View::factory('sample',$data);
    to
    $this->response->body = View::factory('sample',$data); here is the error
    ErrorException [ Error ]: Call to a member function get_title() on a non-object the controller $data = $feed->get_items();
    $this->response->body = View::factory('sample',$data); the view
    foreach($feed->get_items() as $item)
    {
    echo $item->get_title();
    }
  • Try using:
    $this->response->body = View::factory('sample')
        ->set('feeds', $feed->get_items());
    

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion