PHPackages                             nswdpc/silverstripe-grid-helpers - 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. nswdpc/silverstripe-grid-helpers

ActiveSilverstripe-vendormodule[Templating &amp; Views](/categories/templating)

nswdpc/silverstripe-grid-helpers
================================

Allow an editor to specify how lists of elements and elements should render, based on your theme

v1.0.0(2y ago)05.3k[2 PRs](https://github.com/nswdpc/silverstripe-grid-helpers/pulls)4BSD-3-ClausePHP

Since Sep 8Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/nswdpc/silverstripe-grid-helpers)[ Packagist](https://packagist.org/packages/nswdpc/silverstripe-grid-helpers)[ RSS](/packages/nswdpc-silverstripe-grid-helpers/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (9)Dependencies (5)Versions (14)Used By (4)

Grid helpers for Silverstripe
=============================

[](#grid-helpers-for-silverstripe)

This module provides some basic grid/display choices for Elemental elements, accessible to content editors.

Features
--------

[](#features)

- ElementChildGridExtension: apply column selection to an element containing child items (eg. `ElementList`, a gallery with images)
- ElementDisplayChoiceExtension: apply a display option to an element, for use by templates.
- ElementHasChildrenExtension: apply layout decisions to an element containing child items (eg. `ElementList`, a list of publications)

The default grid behaviour is to use the NSW Design System grid, which is quite similar to Bootstrap. You can modify this via configuration.

Configuration
-------------

[](#configuration)

The `Configuration` model is used to set base grid definitions and return strings for use as CSS classes.

You can modify values to use other grid systems, for instance to use the Bootstrap grid:

```
NSWDPC\GridHelper\Models\Configuration:
  grid_prefix: 'col'
```

Or, for [Reflex Grid](https://reflexgrid.com/#grid-introduction):

```
NSWDPC\GridHelper\Models\Configuration:
  grid_prefix: 'col'
  grid_mapping:
    xs: 'xs'
    sm: 'sm'
    md: 'md'
    lg: 'lg'
    xl: 'xlg'
```

Use `Injector` to provide your own configuration model - just remember to extend `NSWDPC\GridHelper\Models\Configuration`

Templating
----------

[](#templating)

Using the default [ElementalList template](https://github.com/dnadesign/silverstripe-elemental-list/blob/master/templates/DNADesign/ElementalList/Model/ElementList.ss) your template could look something like this:

```

{$Title}

                {$Me}

```

The above will use the selected `CardColumns` value. You can pass a value from the template to override the selection made in the CMS:

```

    {$Me}

```

In complex layouts where options are passed in templates via an `` a variable can be used:

```

    {$Me}

```

### Display choice

[](#display-choice)

The `ElementDisplayChoiceExtension` can be applied to any content-related element, to allow a content editor a degree of choice around how that content should be displayed.

Your theme/template itself will determine how this should be handled based on the value provided.

Assuming the ElementDisplayChoiceExtension was applied to ElementContent:

```

```

The module provides a number of default 'sub types' that can be selected, and you can configure your own.

### Consistent display within a list

[](#consistent-display-within-a-list)

If the relevant element is a child of an ElementalList, the display choices will be removed from the CMS and the list's display choices should be honoured in your templates. This it to avoid, for instance, a grid of items made up of differently styled content elements.

The list element, and any other Element that has the `ElementHasChildrenExtension` will gain a `List Type` and `Content style` field, for use in defining how the child items should be displayed. The default types selectable are taken from most standard design/component systems (eg. Card, Content Block, Tabs, Link list, List items).

### Templating

[](#templating-1)

As with all things Silverstripe, the frontend/template implementation is entirely up to you. This module just provides some hints as to how things should be displayed. Your theme/template should implement a solution for your user interface/component library of choice.

Maintainers
-----------

[](#maintainers)

- [dpcdigital@NSWDPC:~$](https://dpc.nsw.gov.au)

Bugtracker
----------

[](#bugtracker)

We welcome bug reports, pull requests and feature requests on the Github Issue tracker for this project.

Please review the [code of conduct](./code-of-conduct.md) prior to opening a new issue.

Security
--------

[](#security)

If you have found a security issue with this module, please email digital\[@\]dpc.nsw.gov.au in the first instance, detailing your findings.

Development and contribution
----------------------------

[](#development-and-contribution)

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.

Please review the [code of conduct](./code-of-conduct.md) prior to completing a pull request.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance46

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~121 days

Recently: every ~159 days

Total

9

Last Release

785d ago

Major Versions

v0.2.0-rc4 → v1.0.0-rc12023-06-23

v0.2.0 → v1.0.02024-05-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/1caefd99092b4a43254e48c40347224f671032ec1ffc3a457e06a7e9ab6e7c02?d=identicon)[nswdpc](/maintainers/nswdpc)

---

Top Contributors

[![JamesDPC](https://avatars.githubusercontent.com/u/69664712?v=4)](https://github.com/JamesDPC "JamesDPC (15 commits)")[![tardinha](https://avatars.githubusercontent.com/u/457209?v=4)](https://github.com/tardinha "tardinha (3 commits)")

---

Tags

csselementalgridsilverstripesilverstripegridlayoutelemental

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/nswdpc-silverstripe-grid-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/nswdpc-silverstripe-grid-helpers/health.svg)](https://phpackages.com/packages/nswdpc-silverstripe-grid-helpers)
```

###  Alternatives

[dnadesign/silverstripe-elemental

Elemental pagetype and collection of Elements

1141.1M309](/packages/dnadesign-silverstripe-elemental)[silverstripe/login-forms

A collection of templates for the CMS login screens

191.4M30](/packages/silverstripe-login-forms)[dnadesign/silverstripe-elemental-decisiontree

Element displaying information in regards to answers given to questions

1117.7k1](/packages/dnadesign-silverstripe-elemental-decisiontree)[wedevelopnl/silverstripe-elemental-grid

Elemental grid module

1015.0k2](/packages/wedevelopnl-silverstripe-elemental-grid)

PHPackages © 2026

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