My project exists as three environments hosted on three separate URLs with three separate app names (dev, test and production respectively). I want to make changes to my interfaces that only render in certain environments (mainly dev) so that they don't interfere with the client's UI experience. I was wondering if there was some sort of metadata or variable that I could use to identify them for conditional logic. I know pp! variables do something similar for processes. Also, using string fragments from the unique parts of the URLs might work too, but I wasn't sure what methods are the current gold standard.
Discussion posts and replies are publicly visible
Create a constant, the same in all environments... and check the value inside your interfaces in order to control the behavior...
Ok, so the constant's handle stays the same, it's merely the value that I set within the interface that changes from environment to environment/app to app? I had assumed that a constant had to be set and available globally, but I might be confusing that with something else.
That's it...
You can use an expression to extract the hostname from the URL and then devise a rule to determine which environment you're in.