Mapping Issue

So everything was working great on my site when I had it just under root and the url was http://localhost/danvega. I changed the domain over to and I am still on my localhost. I added a mapping in the administrator for /coldbox to c:\www\coldbox. Now I am finding places where coldbox thinks that it is located under my project. For instance when the message box displays an error message it thinks the icon is located at

What did I miss here?

Sounds like you’re missing a virtual directory (IIS) or alias (apache) pointing to coldbox.

Oh, and by the way, in my opinion you should not actually have those, as it makes the entire coldbox directory structure available on the web. I would change the CSS to point to images in a safe spot.

How does everyone else do it? Changing the ColdBox css seems like a bad move to me… there has to be a better answer here.

Override the messagebox CSS.


Not sure exactly what you’re are experiencing here, but it sounds more like the settings more than anything.

Personally I would be using the mapping in the Application.cfc and not in the Adminstrator, the upside to this is that you can run multiple ColdBox sites with different versions of ColdBox and/or make sure that they all use the same location and can copy to another server without touching the CF Admin.

Caching, saving of Class files can maybe also effect this when dishing up the cached or saved class.

But to be honest this sounds like the CSS should be using …\images rather than /coldbox/images to avoid this. This might be something Luis might need to have a look at.


Andrew Scott

We customized the message box plugin that let’s us add messages client-side with jQuery and made our own version that we inject with coldbox:myplugin. We just point to our own images.

One way or another, if you are going to use the standard images though, that folder will need to be web accessible be it a mapping, or just putting /coldbox in the web root. If you don’t want all of coldbox/system dangling out there on the interwebs, you could create a web server mapping to only the coldbox/system/includes/images folder.
Well, I suppose if we wanted to be sneaky, we could write a CF proxy for the images so the path was like /coldbox/system/includes/images/imageProxy.cfm?file=cmsg.gif but I can think of a couple of reasons not to do that.

Perhaps a good enhancement would be a setting for the plugin to specify the external path for where you are going to make the info, warning, and error images available.




I did not mean to change the CSS file(s) that ship with ColdBox, but rather to override them in your local style sheet. And not only is that not a bad idea, but it’s a great one. That’s why they’re cascading style sheets. :slight_smile:

The simplest answer has now been provided twice. :slight_smile: Open the messagebox CSS file, copy/paste the relevant styling into another stylesheet and give it a more specific selector. Voila. There is no need for changes to the framework… this is how CSS is supposed to work.

I’d hate to see Coldbox get too big and cluttered with small stuff like this. Just because you can do it, doesn’t mean you should. :slight_smile:

Just my $.02.

Jason Durham

Guys read the docs. The messagebo plugin has a setting you do for CSS override. Then it uses yours and not the coldbox internal one.

Luis Majano
Ortus Solutions, Corp
Toll free phone/fax: 1-888-557-8057
Mobile: 909-248-3408

I am sorry but I must be missing something, I don’t see anything in the docs (or in the code) about a css setting

@Andy - I have to use a mapping from cf because the application inherits from coldbox and by default cf doesn’t know where that is.


settings = {
messagebox_style_override = true

Then setup some styles in your stylesheet like this.

/* ------------------------------------------------------------------------------------------------------------------------------------------------------

ColdBox Message Box

------------------------------------------------------------------------------------------------------------------------------------------------------ */

p.cbox_messagebox {

margin**:** 0**;**


.cbox_messagebox {

font-size**:** 13px**;**

font-weight**:** bold**;**


.cbox_messagebox_info**,** .cbox_messagebox_warning**,** .cbox_messagebox_error {

border**:** 1px solid #630000**;**

margin**:** 0 0 10px 0**;**

padding**:** 10px 10px 10px 40px**;**


.cbox_messagebox_info {

background**:** #ccffcc url(/includes/images/icons/shine/24x24/accept.png) no-repeat scroll .5em 50%;


.cbox_messagebox_info a {

color**:** #42a642**;**


.cbox_messagebox_info a**:**hover {

color**:** #a3bfa3**;**

text-decoration**:** none**;**


.cbox_messagebox_warning {

background**:** #ffffcc url(/includes/images/icons/shine/24x24/warning.png) no-repeat scroll .5em 50%;


.cbox_messagebox_warning a {

color**:** #ec981f**;**


.cbox_messagebox_warning a**:**hover {

color**:** #806b4d**;**

text-decoration**:** none**;**


.cbox_messagebox_error {

background**:** #b53232 url(/includes/images/icons/shine/24x24/delete.png) no-repeat scroll .5em 50%;

color**:** #fdf3e7**;**


.cbox_messagebox_error a {

color**:** #fdf3e7**;**


.cbox_messagebox_error a**:**hover {

color**:** #ccc**;**

text-decoration**:** none**;**


Hope that helps.

Curt Gratz

Computer Know How

that worked…thank you.


I updated the docs at to avoid confusion in the future.


You rock…thanks Curt!

Ok my advice switch to the non iheritance version, the only difference is that instead of inherting ColdBox it is imported in the Application.cfc I actually prefer this method because of what you describe.


Andrew Scott

I didn’t even realize that was an option, thanks Andrew!

Thank You
Dan Vega