Displaying different layout bg-color based on the environment
We have requirement to change the banner of bg-color of the app based on the environment. For – e.g. they want TEST – to be red – ACCP to be blue and PROD to be green. I know I can use a combination of Java Actions IsInDevelopment() and getApplicationRootUrl() – to figure out what environment they are in. How do I make that into an expression that can be plugged in as css conditional expression?
Instead of inventing the wheel and only creating the tip of the iceberg, you better use Marketplace modules. ‘Environment variables’ contains everything you need to distinguish between environments and to add different colors and badges per environment.
Since Mx9.6 this module is integrated in module ‘System Management’, so you might just use that one. In that module check “Snip_ReadMe_SystemManagement” → Tab “Environment styling” on how to use it.