Skip to content

Instantly share code, notes, and snippets.

@jules0x
Last active March 1, 2020 22:54
Show Gist options
  • Save jules0x/36f40fdede4f2d2f75be to your computer and use it in GitHub Desktop.
Save jules0x/36f40fdede4f2d2f75be to your computer and use it in GitHub Desktop.
# Sitemode CSS Add some custom styling to visually the environment you're currently editing. Helps prevent accidently testing things in prodution.
<?php
//Set CMS style based on environment type
if (Director::isDev()) {$sitemodeCSS = 'app/css/sitemode-dev.css';}
if (Director::isTest()) {$sitemodeCSS = 'app/css/sitemode-test.css';}
if (Director::isLive()) {$sitemodeCSS = 'app/css/sitemode-live.css';}
Config::inst()->update('LeftAndMain', 'extra_requirements_css', [
$sitemodeCSS
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment