Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Pagination
  • I can generate the pagination just fine.
    in the previous beta version, I passed it to the template $data = Pagination::create_links();
    $this->template->content = View::factory('search',$data); while that worked fine ( in the view I did : echo $pagination) now in RC1 instead I get the content of the string displayed as text as opposed to anchors etc etc. thank you for your help
  • In Fuel we have "Output filtering" instead of input filtering by default as of RC1 (you can switch this if you want in app/config/config.php), this means that anything passed to the view gets pushed through htmlentities to prevent XSS. Dan explained both on his blog. Objects will either have all their properties filtered or are converted to strings to be filtered when they have a __toString method (the exception to this are objects of class View, ViewModel or Closures - and any you might whitelist yourself) and strings will always be filtered. All of this unless you pass it explicitly to the view without filtering. If you want a variable passed to the view unchecked you need to use the View::set() method with false as its last param. That switches off the filtering for the variable they're setting, thus allowing them to pass the Validation object.
    $this->template->content = View::factory('search');
    $this->template->content->set('pagination', Pagination::create_links(), false);
    

Howdy, Stranger!

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

In this Discussion