2008年9月24日星期三

[fw-mvc] Zend_Paginator Partial

I am using Zend_Paginator in a very standard setup.

My index action of the controller produces a form. Also, if the form is
filled in (i.e. is valid), it (the same index action) proceeds to
generate a collection of objects filtered by information entered into
the form. This collection of objects in then paginated and all is well
for the first page of results.

When I click onto the next page, the form data is not sent and so there
is no model for the paginator to work with.

My immediate idea was to add an additional parameter to the
first/next/last/prev links which could be used to regenerate the same
model as the paginator was using with page 1.

The problem is that the pagination control is a partial and I cant
figure out how to pass global view variables to it.

Is there a way to do this or is my general approach (i.e. adding query
strings to the paginator URI's) wrong?

--

Kind Regards,

*Daniel Skinner*

*Tel:* 01977 87 80 22
*Fax:* 08455 08 36 15
*Mobile:* 07791 360 230
skinner@destiny-denied.co.uk <mailto:skinner@destiny-denied.co.uk>
www.destiny-denied.co.uk <http://www.destiny-denied.co.uk/>

没有评论: