PHPackages                             nzta/silverstripe-sitebanner - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nzta/silverstripe-sitebanner

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

nzta/silverstripe-sitebanner
============================

Site-wide banners activated through the CMS

5.1.0(2mo ago)1038.7k↑31.3%12[2 issues](https://github.com/silverstripe/silverstripe-sitebanner/issues)BSD-3-ClausePHPPHP ^8.3CI failing

Since May 28Pushed 2mo ago7 watchersCompare

[ Source](https://github.com/silverstripe/silverstripe-sitebanner)[ Packagist](https://packagist.org/packages/nzta/silverstripe-sitebanner)[ Docs](https://github.com/silverstripe/silverstripe-sitebanner)[ RSS](/packages/nzta-silverstripe-sitebanner/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (8)Dependencies (12)Versions (15)Used By (0)

Site Wide Banners
=================

[](#site-wide-banners)

Allows CMS authors to create site-wide banners, to alert visitors of important information regardless of the page they're viewing.

Features
--------

[](#features)

- Themeable templates
- Configure type of alert (defaults to "info", "warning" and "alert")
- Multiple concurrent alerts
- Set start/end dates for alert
- Permission controls
- Localisation of CMS UI controls and labels
- Preview and publish through versioning
- CMS users can make banners "dismissible", allowing users to hide banners after reading.
- Rich-text editing (insert links and images)
- Optional: Sorting through [gridfieldextensions](https://github.com/symbiote/silverstripe-gridfieldextensions)
- Support for [subsites](https://github.com/silverstripe/silverstripe-subsites)

Screenshot
----------

[](#screenshot)

[![CMS Preview](docs/_img/cms-screenshot.png)](docs/_img/cms-screenshot.png)

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

[](#requirements)

- php &gt;= 8.0
- SilverStripe ^5

For a Silverstripe CMS ^4 compatible version of this module, please see the [releases &lt;=3.0.1](https://github.com/silverstripe/silverstripe-sitebanner/tree/3.0.1).

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

[](#installation)

```
composer require nzta/silverstripe-sitebanner

```

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

[](#configuration)

#### Site settings

[](#site-settings)

Add the following to your YAML config to configure the module:

```
SilverStripe\SiteConfig\SiteConfig:
  extensions:
    - NZTA\SiteBanner\Extensions\SiteConfigExtension

```

Add the following environment variable to you `.env` file to activate the module in site settings:

```
SITEBANNER_SITECONFIG=1

```

The site banner can be configured in `admin/settings` now.

> Note: The site settings interface is a legacy feature that exists to keep background compatibility for anyone who still want to use this interface. This feature won't receive future updates, and we recommend using the default implementation with model admin. With admin model we are not forced to expose site settings to CMS users who must only be allowed to managed site banners.

#### Model admin

[](#model-admin)

By default, the site banners are managed from the model admin interface.

Templates
---------

[](#templates)

In order to show the banners, you need to add them to your template:

```

        $Content

            ×

```

Bootstrap Styles
----------------

[](#bootstrap-styles)

If you're using Bootstrap, it's easy to get useful default styles for alerts through a combination of [contextual backgrounds](http://getbootstrap.com/css/#helper-classes-backgrounds)and [icons](http://getbootstrap.com/components/#glyphicons).

```

            $Content

            $Content

            $Content

```

Examples on the SilverStripe default theme:

[![Info styling](docs/_img/info.png)](docs/_img/info.png)

[![Warning styling](docs/_img/warning.png)](docs/_img/warning.png)

[![Alert styling](docs/_img/alert.png)](docs/_img/alert.png)

Features
--------

[](#features-1)

### Display banners only on the selected pages

[](#display-banners-only-on-the-selected-pages)

`NZTA\SiteBanner\Extensions\PageSelectionExtension`

Add the followig to your YML file to enable the fature

```
---
Name: app-sitebanenr
After: sitebanner
---

NZTA\SiteBanner\Extensions\PageSelectionExtension:
  enabled: true
```

Then you are going to have a tab with gridfield to select the pages a banner must be visible on that page only.

In template, you will need to pass the page ID to ``

Permissions
-----------

[](#permissions)

By default, every author with access to the "Settings" section (`EDIT_SITECONFIG` permission code) can set alerts. You can customise this by YAML configuration:

```
NZTA\SiteBanner\Models\SiteBanner:
  required_permission_codes:
    - ADMIN

```

Sorting
-------

[](#sorting)

You can allow authors to sort multiple alerts by installing the [gridfieldextensionsn](https://github.com/symbiote/silverstripe-gridfieldextensions) module. It'll get automatically picked up by the code.

Limitations
-----------

[](#limitations)

- Does not trigger republish when [staticpublisher](https://github.com/silverstripe/silverstripe-staticpublisher) is used

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance79

Regular maintenance activity

Popularity38

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~194 days

Recently: every ~272 days

Total

12

Last Release

87d ago

Major Versions

1.0.0 → 3.0.02022-08-07

2.0.1 → 4.0.0-beta12023-02-24

4.0.0 → 5.0.02025-07-13

4.x-dev → 5.1.02026-04-08

PHP version history (2 changes)3.0.0PHP &gt;= 8.0

5.1.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/111025?v=4)[Ingo Schommer](/maintainers/chillu)[@chillu](https://github.com/chillu)

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

![](https://www.gravatar.com/avatar/7dc222f909513bf085ab0c7eb4a6dedd6e26bf2b9e5702f17cf8aad8b70b03c2?d=identicon)[ishannz](/maintainers/ishannz)

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

---

Top Contributors

[![satrun77](https://avatars.githubusercontent.com/u/166450?v=4)](https://github.com/satrun77 "satrun77 (15 commits)")[![chillu](https://avatars.githubusercontent.com/u/111025?v=4)](https://github.com/chillu "chillu (13 commits)")[![ishannz](https://avatars.githubusercontent.com/u/20032948?v=4)](https://github.com/ishannz "ishannz (3 commits)")[![NightJar](https://avatars.githubusercontent.com/u/778003?v=4)](https://github.com/NightJar "NightJar (3 commits)")[![mikenuguid](https://avatars.githubusercontent.com/u/44601742?v=4)](https://github.com/mikenuguid "mikenuguid (2 commits)")[![dnsl48](https://avatars.githubusercontent.com/u/9313746?v=4)](https://github.com/dnsl48 "dnsl48 (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

silverstripecmsbanner

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/nzta-silverstripe-sitebanner/health.svg)

```
[![Health](https://phpackages.com/badges/nzta-silverstripe-sitebanner/health.svg)](https://phpackages.com/packages/nzta-silverstripe-sitebanner)
```

###  Alternatives

[axllent/silverstripe-cms-tweaks

Several CMS usability improvements

1726.4k1](/packages/axllent-silverstripe-cms-tweaks)

PHPackages © 2026

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