RE: [coldbox:9529] Conditional Statement based on Environment

What I do is put my production settings in the main part of the config, and then overwrite them in the environment-specific functions.

So my production setting for customErrorTemplate is “views/assets/callCustomerService.cfm”, but in my development() function of my config, I override it with the following line:

coldbox.customErrorTemplate = ‘/common/views/assets/BugReport.cfm’;

That way, a pretty page is displayed on production, and my juicy, detail-filled error report is displayed on dev.

If you are just wanting to add some information inline, you can use the “environment” setting which is automatically set for you based on your environments you have set up in your config.

So the if statement would look something like this:

// Output extra debugging info here.