Jump to:

3444 Posts in 1030 Topics by 871 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: 506 Views
  • dacar
    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
    Forum Moderator
    473 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.

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.