whiteoctober / Pagerfanta

Pagination for PHP.
Other
1.59k stars 2 forks source link

how to change the URL to include the page in route instead of adding GET parameter #253

Closed etshy closed 6 years ago

etshy commented 6 years ago

As title said, I would like my route to be /posts/{page} but I always get /posts?page={page} and don't find anywhere how to change this.

etshy commented 6 years ago

I feel dum to find an answer just few minutes after my post...

pasisngs options like that {{ pagerfanta(pagination, 'semanticui_inverted', {'routeName': 'latest', 'routeParams':{'page':'page'}}) }} (routeName and routeParams) did the trick.

I settes the routParams randomly though, I didn't what value was expected, but this seems to be working.