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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

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

How to group data by categories


Go to End


1059 Views

Avatar
VPull

Community Member, 58 Posts

15 March 2016 at 1:27am

Hello again,

I am trying to get the list group by category.

In ProjectPage class

static $many_many = array(
        'Terms' => 'TaxonomyTerm'
    );

in TaxonomyTermExtension class

private static $belongs_many_many = array(
        'ProjectPage' => 'ProjectPage'
    );

I want to show all projects group by category in ProjectHolder.ss