WhiteOctoberPagerfantaBundle icon indicating copy to clipboard operation
WhiteOctoberPagerfantaBundle copied to clipboard

Documentation - simple usage

Open SecondeJK opened this issue 8 years ago • 1 comments

I've spent a bit of time learning how this bundle works slowly. It works well, but I think the readme could really benefit from the most basic usage example - for instance:

I have 3 items in an array.

I want to paginate them.

Here's how you do it in the controller using an adapter (this is covered pretty well)

Here's how you render, in Twig

  1. The current list of items to loop through
  2. The paginator
  3. The controller routing so that you print the current page.

While some rendering bits are covered, the routing and rendering of items aren't really, making it a slow process to understand how to do this, which is after all the first thing anyone is going to want to do on a paginator.

If I have time and/or you agree I can write a draft of this and PR it

SecondeJK avatar Sep 05 '17 11:09 SecondeJK

That sounds very sensible, @SecondeJK. Thank you for offering to help - you're right that the documentation could be made clearer. A PR would be great if you get time; thank you very much :+1:

sampart avatar Sep 05 '17 13:09 sampart