i’ve followed the pagination tutorial from http://framework.zend.com/manual/en/zend.paginator.usage.html
I have successfully implemented pagination for my site, but i am not satisfied with the URLs output for the paging. example url for page 2:
http://www.example.com/posts/index/page/2
What i would like is to remove the index and just have http://www.example.com/posts/page/2
Why is index included while accessing this->url(in the my_pagination_control.phtml from tutorial in link)?
Is there a way to gracefully just show posts/page/2? or even just posts/2?
I feel that the previous answer is not enough, I’ll give mine. First of all you can add a router in your
bootstrap.phpthat looks like:and then, use in your view this simple line:
In the case of ‘paginator1’, the url will be printed in this way:
In the case of ‘paginator2’, the url will be printed in this way:
Obviously where you see
CONTROLLER-NAMEwill be the name of the controller you write.