Ticket #166 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Config Override Variable - Choose your own config file

Reported by: lmajano Owned by: lmajano
Priority: high Milestone: 2.0.1
Component: Architecture Version: 2.0.0
Severity: normal Keywords:
Cc:

Description (last modified by lmajano) (diff)

This is a late ticket that I forgot to create on this new feature thanks to Unit Testing and Tom DeManincor?. You will now be able to load any configuration file apart from the one used in the conventions by setting an override variable before the coldbox include. This is great for multi-tiered environment.

<cfif tier eq "dev">
  <cfset COLDBOX_CONFIG_FILE = "config/dev_config.xml.cfm">
<cfelseif tier eq "qa">
  <cfset COLDBOX_CONFIG_FILE = "config/qa_config.xml.cfm">
<cfelse>
  <cfset COLDBOX_CONFIG_FILE = "config/config.xml.cfm">
</cfif>

<cfinclude template="/coldbox/system/coldbox.cfm">

Change History

Changed 3 years ago by lmajano

  • status changed from new to assigned
  • description modified (diff)

Changed 3 years ago by lmajano

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.