Have you ever found yourself wondering if you are staring at your development, test or your production app in your browser? If you have, now you can try the AMAZING ENVIRONMENT INDICATOR. It was inspired by Drupal's Environment Indicator.

It should work with the 1.1 branch, but only tested on 1.1.7
Put it in the extensions folder. That's pretty much it ...
// by default the color is set to #006400 and the position is `left` (could be `right`) // you wanna put it probably in your main layout file with some IF statements ... if( YII_DEBUG ) { $this->widget( 'ext.environmentindicator.ei', array( 'text' => 'DEV ENVIRONMENT' ) ); } else { if( ! Yii::app()->user->isGuest ) { $this->widget( 'ext.environmentindicator.ei', array( 'text' => 'PRODUCTION ENVIRONMENT', 'color' => '#f00', 'position' => 'left' ) ); } }
Click here to see the Environment Indicator in action!
Total 1 comment
Very handy in combination with Environment extension :)
Leave a comment
Please login to leave your comment.