Paginator example please for nette 2.1.0
- kle_py
- Member | 4
Hi,
i am trying to add paginator feature to the blog of the quickstart. I have
seen the doc page, but i cannot get it work :( .
I also see there is a plugin calles VisualPaginator and tried it too. Is it
still compatible and better than the paginator which comes in the package
(/utils directory) ?
It would lead me a step further using nette if i could get this working.
Thank You
- vyvazil.jakub
- Member | 6
Hi kle_py,
VisualPaginator should work with version 2.1 as well. Anyway, VisualPaginator is an extension of Paginator. I believe you would like to you VisualPaginator, so you should download VisualPaginator and copy the folder to your project (ie /app/components/).
Your presenter should look like this:
You will need FrontRepository.php, so create something like this:
You have to set up your database connection in config.neon, but I assume you've already done that. Now just simply put {control vp} in your template (in this case default.latte}.
There is a template.phtml file in Visual Paginator – that's the way, how to simply modify the look of Visual Paginator.
Last edited by vyvazil.jakub (2014-02-04 13:01)