Jump to:

3392 Posts in 976 Topics by 852 members

Template Questions

SilverStripe Forums » Template Questions » GroupedBy not working

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

Page: 1
Go to End
Author Topic: 440 Views
  • dacar
    Avatar
    Community Member
    168 Posts

    GroupedBy not working Link to this post

    Hi, in my template i use a loop to get all the children of a holder page

    <% loop AllChildren.GroupedBy(Zimmerart) %>
    <li>$ClassName $Zimmerart</li><% end_loop %>

    The Loop returns the correct name of the Class and the correct content for the variables $Zimmername.

    But if i try to group the loop, nothing will be returned:

    <% loop AllChildren.GroupedBy(Zimmerart) %><li>$ClassName $Zimmerart</li><% end_loop %>

    Can anybody give a hint? Greetings, Carsten.

  • simon_w
    Avatar
    Forum Moderator
    467 Posts

    Re: GroupedBy not working Link to this post

    See the documentation on how to group DataLists. GroupedBy is no longer a method you can just call from the templates.

    440 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.