pagerfanta

Customising the layout of Pagerfanta pagination with a custom template

冷暖自知 提交于 2019-12-22 18:24:12
问题 I have Pagerfanta installed and working, however I am having difficulty in customising the layout. I read on Github that I need to pass through my_template , however I am unsure where this should be configured and what specificially this refers to. Custom template If you want to use a custom template, add another argument <div class="pagerfanta"> {{ pagerfanta(my_pager, 'my_template') }} </div> Ideally I would like to have my own Twig template that I can modify, however I don’t know if

pagerfanta - DoctrineORMAdapter Sorting

徘徊边缘 提交于 2019-12-11 18:25:21
问题 Although I know this is trivial I'm stuck trying to implement the pagerfanta Paginator using the DoctrineORMAdapter, I want to paginate all entities sorted by id in descending order, the final SQL I want is this: SELECT id, name FROM User ORDER BY id DESC LIMIT 0, 5; Suppose I had users from A to Z and I want to limit them by 5 each page, what DoctrineORMAdapter is paginating results in User E to A listed in the first page, while what I actually expect is to see User Z to user V in the first

Customising the layout of Pagerfanta pagination with a custom template

可紊 提交于 2019-12-06 11:01:12
I have Pagerfanta installed and working, however I am having difficulty in customising the layout. I read on Github that I need to pass through my_template , however I am unsure where this should be configured and what specificially this refers to. Custom template If you want to use a custom template, add another argument <div class="pagerfanta"> {{ pagerfanta(my_pager, 'my_template') }} </div> Ideally I would like to have my own Twig template that I can modify, however I don’t know if Pagerfanta supports this. Is it all done in PHP? I don't think it supports Twig templates but for sure you