Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

Pagination for a control over a has_many relationship


Reply


2 Posts   1295 Views

Avatar
baba-papa

Community Member, 279 Posts

2 December 2009 at 11:18pm

Edited: 02/12/2009 11:31pm

I have a product category that has a has_many relationship to products. The products are shown in the category´s template:

<%control relationName %>


How can I add a pagination to this template?
I know how to implement a pagination on a control over a DataObjectSet but this is different because the DataObjectSet is created by the framework.

Avatar
baba-papa

Community Member, 279 Posts

3 December 2009 at 1:10am

By now I have solved this by writing a controller method that returns a DataObjectSet and passed the required parameter to DataObject::get(). I presume there is a more efficent way to do that.