Jump to:

23491 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Multiple Grouping Levels in SS3

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 400 Views
  • purplespider
    Community Member
    81 Posts

    Multiple Grouping Levels in SS3 Link to this post

    I'm struggling to get multiple grouping levels working in SS3, it was very simple in SS2.

    Basically I have a bunch of Event data objects, each with a Date & Title and I wish to display them in the template grouped by Year and then Month like so:

          Event X
          Event Y
          Event Z

          Event A
          Event B

    This was easy in SS2, I could just do this:

    function Entries() {
       return DataObject::get("Entry");

    <% control Entries.GroupedBy(Year) %>
       <% control Children.GroupedBy(Month) %>
             <% control Children %>
             <% end_control %>
       <% end_control %>
    <% end_control %>


    However in SS3, I'm struggling to get both groupings to work, I can get the Year grouping working, but not the Month one also. It's something to do with the new GroupedList.

    Can someone please advise how I can achieve this in SS3?


  • purplespider
    Community Member
    81 Posts

    Re: Multiple Grouping Levels in SS3 Link to this post

    Any advice on how to achieve this in SS3 would be much appreciated!

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.