PHPackages                             timkelty/craft-groupby - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. timkelty/craft-groupby

AbandonedCraft-plugin[Templating &amp; Views](/categories/templating)

timkelty/craft-groupby
======================

A Craft plugin (Twig filter) for grouping entries.

1.1(9y ago)243481PHP

Since Nov 25Pushed 7y ago2 watchersCompare

[ Source](https://github.com/timkelty/craft-groupby)[ Packagist](https://packagist.org/packages/timkelty/craft-groupby)[ RSS](/packages/timkelty-craft-groupby/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (9)Used By (0)

groupBy
=======

[](#groupby)

A Craft plugin (Twig filter) for grouping entries.

Note: I have no plan to update this plugin for Craft 3. See , which can do the same thing, but also much more.

Usage
-----

[](#usage)

- `param 1`: Attribute to group by, in dot notation
- `param 2`: Group un-grouped entries by a key. Defaults to `false`, meaning un-grouped items are removed. These entries are always added to the end of the returned array.

```
{% set allEntries = craft.entries.section('blog').find() %}
{% set allEntriesByCat = allEntries|groupBy('myCategoryField.slug', 'unGrouped') %}

```

Examples
--------

[](#examples)

In it's simplest form, the `groupBy` filter works like [Craft's native `group` filter](http://buildwithcraft.com/docs/templating/filters#group).

```
{% set allEntries = craft.entries.section('blog').find() %}
{% set allEntriesByYear = allEntries|groupBy('postDate.year') %}

```

However, `groupBy` can also group by nested objects:

```
{% set allEntriesByCat = allEntries|groupBy('myCategoryField.slug') %}
{% set allEntriesBySection = allEntries|groupBy('section.title') %}

```

And you can even get really crazy if you want:

```
{% set allEntriesByNestedCat = allEntries|groupBy('myEntriesField.myCategoryField.slug') %}
{% set allEntriesByMatrix = allEntries|groupBy('myMatrix.myEntriesField.dateField.localeDate') %}

```

Discussion
----------

[](#discussion)

[Motivation for plugin on StackExchange](http://craftcms.stackexchange.com/questions/4832/is-it-possible-to-group-entries-by-checkbox/4834#4834)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~91 days

Recently: every ~133 days

Total

8

Last Release

3596d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f17a828989c32b4dc355214677bca83beeb894450f4ddb3c2b7fa4897712457c?d=identicon)[timkelty](/maintainers/timkelty)

---

Top Contributors

[![timkelty](https://avatars.githubusercontent.com/u/18329?v=4)](https://github.com/timkelty "timkelty (4 commits)")[![Flamenco](https://avatars.githubusercontent.com/u/819940?v=4)](https://github.com/Flamenco "Flamenco (1 commits)")

### Embed Badge

![Health badge](/badges/timkelty-craft-groupby/health.svg)

```
[![Health](https://phpackages.com/badges/timkelty-craft-groupby/health.svg)](https://phpackages.com/packages/timkelty-craft-groupby)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)[pressbooks/pressbooks-book

This theme is named after Canadian media theorist Marshall McLuhan, who coined the phrase “the medium is the message.” It is designed for academic writing and is also suitable for fiction. Headings are set in Cormorant Garamond, and body type is set in Lora.

206.7k](/packages/pressbooks-pressbooks-book)[silverstripe-themes/simple

The SilverStripe simple theme (default SilverStripe 3 theme)

411.3M8](/packages/silverstripe-themes-simple)[nystudio107/minify

A simple plugin that allows you to minify blocks of HTML, CSS, and JS inline in Craft CMS templates.

1062.0k](/packages/nystudio107-minify)[octfx/template-styles-extender

Extends TemplateStyles with new CSS properties

105.6k](/packages/octfx-template-styles-extender)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
