Hi.
I want to display a note in the panel of a project when it is running on the Production System. As a warning, because in the heat of the moment I like to mix up open tabs So I want to show the Production warning in green, the Development warning in red.
Unfortunately the value of “theme” can’t be set e.g. via pure site-method.
My idea: I put in site.yml 2 info fields. One with the theme positive, one with the theme negative and hide the not matching one, depending on whether I am on the production system or a test url.
I then created a site method that returns the appropriate info (DEV or PROD). I wanted to write this info into another field and simply hide my two info fields with the “when” condition.
But: I can’t set the value. “When” seems to work only when the user makes a manual selection. “Default” works only at creation, so it can’t be dynamic. The whenQuery plugin doesn’t help either.
Am I missing something, is there no way to solve this as simple as thought? Does anyone have a good idea?