PHPackages                             syntro/silverstripe-elemental-baseitem - 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. [Admin Panels](/categories/admin)
4. /
5. syntro/silverstripe-elemental-baseitem

ActiveSilverstripe-vendormodule[Admin Panels](/categories/admin)

syntro/silverstripe-elemental-baseitem
======================================

A basic item handling permissions for elemental blocks with children

2.0.1(4mo ago)16.6k[2 PRs](https://github.com/syntro-opensource/silverstripe-elemental-baseitem/pulls)4BSD-3-ClausePHPCI passing

Since Apr 3Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/syntro-opensource/silverstripe-elemental-baseitem)[ Packagist](https://packagist.org/packages/syntro/silverstripe-elemental-baseitem)[ RSS](/packages/syntro-silverstripe-elemental-baseitem/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (7)Versions (12)Used By (4)

SilverStripe elemental base item
================================

[](#silverstripe-elemental-base-item)

[![🎭 Tests](https://github.com/syntro-opensource/silverstripe-elemental-baseitem/workflows/%F0%9F%8E%AD%20Tests/badge.svg)](https://github.com/syntro-opensource/silverstripe-elemental-baseitem/workflows/%F0%9F%8E%AD%20Tests/badge.svg)[![phpstan](https://camo.githubusercontent.com/639cc050faeefad1a1d1ab830ca7a7950f1eede4402451b9a11cdc89d3a99066/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d73756363657373)](https://github.com/phpstan/phpstan)[![codecov](https://camo.githubusercontent.com/24c145bd8aeeccd577a022dd6f5340fa9f749648de4341ec92f5703e77135024/68747470733a2f2f636f6465636f762e696f2f67682f73796e74726f2d6f70656e736f757263652f73696c7665727374726970652d656c656d656e74616c2d626173656974656d2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/syntro-opensource/silverstripe-elemental-baseitem)[![composer](https://camo.githubusercontent.com/a1309e4e86a57e404172d3d9c5ae3aded70d7d06dea5e8de8e60d23801a9e05d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796e74726f2f73696c7665727374726970652d656c656d656e74616c2d626173656974656d3f636f6c6f723d73756363657373266c6f676f3d636f6d706f736572)](https://packagist.org/packages/syntro/silverstripe-elemental-baseitem)[![Packagist Version](https://camo.githubusercontent.com/2c40b66fcfd072fafdcb869d47b50640b3f9a007ec7f1b147df28cc82f382b47/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73796e74726f2f73696c7665727374726970652d656c656d656e74616c2d626173656974656d3f6c6162656c3d43757272656e74266c6f676f3d636f6d706f736572)](https://packagist.org/packages/syntro/silverstripe-elemental-baseitem)

This module adds a blank base item which you can use to add sub-items to elements and a gridfield config which mimics the parent ElementalArea feel for these Items, allowing an editor to handle these "blocks" like elements.

This module is best used when the goal is to create an element which acts as a holder for some content "blocks". These blocks might for example be cards, images in a gallery or slides in a carousel.

Requirements
------------

[](#requirements)

- SilverStripe: `^6`
- Silverstripe elemental: `^6`

Installation
------------

[](#installation)

```
composer require syntro/silverstripe-elemental-baseitem

```

License
-------

[](#license)

See [License](license.md)

Documentation
-------------

[](#documentation)

First, simply extend the base item:

```
use Syntro\SilverStripeElementalBaseitem\Model\BaseItem;

class Teaser extends BaseItem
{
    private static $displays_title_in_template = true;

    private static $db = [
        // Whatever you need for the item to render
    ];

    private static $has_one = [
        'Section' => TeaserCardsBlock::class,
    ];
}
```

By default, the baseItem has a `Title` and a `ShowTitle` field, similar to the BaseElement in elemental. They will also use the title composite field from the silverstripe-elemental module. This behaviour can be disabled by setting `displays_title_in_template` to false in yaml config or directly in the class.

Then, add the relation to the desired element and configure the gridfield:

```
use DNADesign\Elemental\Models\BaseElement;
use Syntro\SilverStripeElementalBaseitem\Forms\GridFieldConfig_ElementalChildren;

class TeaserCardsBlock extends BaseElement
{
    private static $has_many = [
        'Teasers' => Teaser::class
    ];

    /**
     * @return FieldList
     */
    public function getCMSFields()
    {
        $this->beforeUpdateCMSFields(function ($fields) {
            if ($this->ID) {
                /** @var GridField $griditems */
                $griditems = $fields->fieldByName('Root.Teasers.Teasers');
                $griditems->setConfig(GridFieldConfig_ElementalChildren::create());
            }
        });
        return parent::getCMSFields();
    }
}
```

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

[](#maintainers)

- Matthias Leutenegger

Bugtracker
----------

[](#bugtracker)

Bugs are tracked in the [issues section](https://github.com/syntro-opensource/silverstripe-elemental-baseitem/issues) of this repository. Before submitting an issue please read over existing issues to ensure yours is unique.

If the issue does look like a new bug:

- Create a new issue
- Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots and screencasts can help here.
- Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, Operating System, any installed SilverStripe modules.

Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker.

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.

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance79

Regular maintenance activity

Popularity23

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~286 days

Recently: every ~302 days

Total

7

Last Release

147d ago

Major Versions

1.2.1 → 2.0.02025-10-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/289446336e84f3a201ac80def6e4a2a5289815d628ad5e0c0aa57b2f4bc20e73?d=identicon)[mleutenegger](/maintainers/mleutenegger)

---

Top Contributors

[![mleutenegger](https://avatars.githubusercontent.com/u/1339379?v=4)](https://github.com/mleutenegger "mleutenegger (18 commits)")[![cotpat](https://avatars.githubusercontent.com/u/85751624?v=4)](https://github.com/cotpat "cotpat (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

silverstripecmselemental

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/syntro-silverstripe-elemental-baseitem/health.svg)

```
[![Health](https://phpackages.com/badges/syntro-silverstripe-elemental-baseitem/health.svg)](https://phpackages.com/packages/syntro-silverstripe-elemental-baseitem)
```

###  Alternatives

[silverstripe/cms

The SilverStripe Content Management System

5163.4M1.3k](/packages/silverstripe-cms)

PHPackages © 2026

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