1 reply [Last post]
Lou.Pelagalli
Lou.Pelagalli's picture
Offline
newbie
Last seen: 5 years 6 weeks ago
Timezone: GMT-8
Joined: 2014-12-12
Posts: 1
Points: 2

Hi,

I need to be able to identify when my pages are running on a test system and change the screen appearance accordingly so the users can easily determine if they are in a test or production system.

Changes can be minor like changing the html background color or more complex like repeating the word "TEST" in the background but being able to see through it to the screen content.

The test system would be identified by the server name but can be something different like a file content if necessary, I'm pretty flexible in this regard.

I'm getting tired of changing code every time I promote something to production, and forgetting is not an option.

Suggestions?

Thanks,

Lou

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 3 weeks 1 day ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

Hi Lou.Pelagalli, There are a

Hi Lou.Pelagalli,
There are a few ways you could do this.
The easiest if it is just a visual appearance you need would be to link to a stylesheet that locally has some style changes and on prod is empty.

Otherwise you could use JavaScript or a server side language to workout where you are.