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 /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Pagination for a control over a has_many relationship

Go to End

2 Posts   1647 Views


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.


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.