signify-nz / silverstripe-environmentindicator
Vendor module to add an environment indicator in the CMS as well as information bar for the front-end.
Installs: 2 161
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 11
Forks: 3
Open Issues: 6
Type:silverstripe-vendormodule
Requires
- php: >=7.4
- silverstripe/cms: ^4.0 || ^5.0
- silverstripe/framework: ^4.0 || ^5.0
- silverstripe/vendor-plugin: ^1.0 || ^2.0
- silverstripe/versioned: ^1.0 || ^2.0
Requires (Dev)
- phpunit/phpunit: ^9
- squizlabs/php_codesniffer: ^3.0
This package is not auto-updated.
Last update: 2024-12-19 04:37:28 UTC
README
Environment Indicator
The Environment Indicator Vendor Module reads the SS_ENVIRONMENT_TYPE variable in your .env file (dev, test or live) and loads the applicable javascript to insert a custom div above the menu header in the CMS Admin interface.
The EnvBarExtension also inserts a custom element into the HTML of all pages to provide an information bar detailing the environment and page version. If the logged-in user has access to pages in the CMS, the bar acts as a link to open the page in the CMS via a new browser tab.
The bar does not appear in live mode for unauthorised users.
Requirements
Installation
Composer:
composer require signify-nz/silverstripe-environmentindicator
Documentation
No further configuration is required.
Customisation can be achieved by editing the EnvBar.ss template or the envbar- .js and .css files. Functional tests are available in the tests directory. These will need to be updated if you modify the template.
Usage
This module performs an informative function only. No special usage instructions are available.