Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Twitter Bootstrap themed version of the ColdBox Plugin: MessageBox

branch: master
MessageBox.cfc Revision 1
README.md Update README.md
README.md

ColdBox-Plugin-MessageBox-TwitterBootstrap

Twitter Bootstrap themed version of the ColdBox Plugin: MessageBox

Extends: coldbox.system.plugins.MessageBox : http://wiki.coldbox.org/wiki/Plugins:MessageBox.cfm

New function: isValidMessageType()

A new function to verify if a submitted message type is valid. This custom version of MessageBox allows four message types to account for Twitter Bootstrap's Alert styling.

http://twitter.github.com/bootstrap/components.html#alerts

Inheritance!

The functions setMessage() and renderit() currently exist as customized functions in order to implement isValidMessageType(). I've forked the main ColdBox repository and submitted a pull request to implement isValidMessageType() in the core ColdBox MessageBox plugin. If that is accepted, then I can remove these two functions.

Implementation

Just drop this in your root /plugins/ folder and access it using getMyPlugin() instead of getPlugin() in order to reference this custom plugin and not the core version.

#getMyPlugin("MessageBox").setMessage("success", "Yay!")#

Using getPlugin() will fail since "success" is not a valid message type under the core plugin.

There is also no reason to override the default messagebox styling since the generated HTML uses Twitter Bootstrap's classes.

Something went wrong with that request. Please try again.