Details
-
Type:
Improvement
-
Status:
Postponed
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.8.1
-
Fix Version/s: None
-
Component/s: Zend_Paginator
-
Labels:None
Description
Currently, when you don't set the partial for paginationControl, it just throws an exception. But, IMHO, you could render a decent paginator without it being required. Say
<ul class="paginator"> <li class="first"><a href="#">«</a></li> <li class="previous"><a href="#">‹</a></li> <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li class="current"><span>4</span></li> <li><a href="#">5</a></li> <li class="next"><a href="#">›</a></li> <li class="last"><a href="#">»</a></li> </ul>
This would lower the requirements for using it.
The params needed for this would be the HTML for the first/last, prev/next combo, the name of the URL param (which could default to "page") for the url() view helper and the route name (defaulting to... well, "default"). Maybe, if feeling really generous, one could supply an "attribs" param which would get embeded to <ul> itself (defaulting to array("class" => "paginator"); I reworked the paginationControl helper by adding __toString() and render() as paginationControl() returns $this.
This would enable cuszomizing the paginator rendering per instance, like: