Jump to:

3393 Posts in 976 Topics by 852 members

Template Questions

SilverStripe Forums » Template Questions » Pagination for a control over a has_many relationship

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

Page: 1
Go to End
Author Topic: 1235 Views
  • baba-papa
    Avatar
    Community Member
    279 Posts

    Pagination for a control over a has_many relationship Link to this post

    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.

  • baba-papa
    Avatar
    Community Member
    279 Posts

    Re: Pagination for a control over a has_many relationship Link to this post

    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.

    1235 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.