Existing ColdBox Application
Deploy ContentBox on an existing ColdBox application.
If you already have a ColdBox application and wish to install ContentBox, you most definitely can.
System Requirements
Please note that ContentBox requires ColdBox 7.x
Step 1: Dependencies
Since version 3.5.0, you can now issue a command in CommandBox to install the ContentBox module into an existing ColdBox application. Just open a box shell in the root of your ColdBox application and use the following command:
install contentbox,contentbox-installer-moduleThis will install the ContentBox module with all of its dependencies under the /modules/contentbox and the ContentBox installer module under /modules/contentbox-installer.
Lucee ORM Extension
If you are using Lucee, then you need to use the Ortus ORM Extension https://orm-extension.ortusbooks.com/getting-started/installation
box install [email protected]Step 2: Application.cfc Updates
Application.cfc UpdatesNow open your Application.cfc and you will add the following updates:
Mappings
ORM Settings
Step 3: .env Settings
.env SettingsBelow are the env settings for ContentBox to run, spice up as needed
Step 4: Module Settings
Here is the collection of the latest module settings for ContentBox. Make sure you copy/merge the settings found here: https://github.com/Ortus-Solutions/ContentBox/tree/development/config/modules
Step 5: CacheBox.cfc Settings
CacheBox.cfc SettingsOpen your CacheBox configuration file: config/CacheBox.cfc and add the following cache declarations:
Once these updates are done, then you can start up the server and visit the installer URL: http://localhost:port/cbInstaller
Step 6 (Optional) : UI Route
By default ContentBox is in take over mode. Meaning that the UI module will intercept all calls made to the application and process them as pages or blog entries. If you DO NOT want this to happen, then you can segregate the UI module into a single entry point URL like blog or site or pages. You can do this by opening the following file: modules/contentbox-ui/ModuleConfig.cfc and looking for the following code:
Now update the this.entryPoint to whatever you like the entry point URL to be. Restart the application and voila!
Last updated
Was this helpful?
