ColdBox SideBar
Introduction
Well, because an image says more than 1000 words...
Sure, the ColdBox SideBar still works on exception...
Configuration
Enabling the ColdBoxSideBar is easy!
Coldbox.xml.cfm
Step 1: Enable ColdBoxSideBar Setting
In order for the sidebar to render, you need to enable it via a custom setting in <YourSettings> element. This setting is called ColdBoxSideBar and it must be a boolean variable.
<YourSettings> <Setting name="ColdBoxSideBar" value="true" /> </YourSettings>
Step 2: Add ColdBoxSideBar Interceptor
<Interceptor class="coldbox.system.interceptors.coldboxSideBar"> <Property name="yOffset">50</Property> <Property name="isScroll">false</Property> <Property name="slideSpeed">15</Property> <Property name="waitTimeBeforeOpen">0</Property> <Property name="waitTimeBeforeClose">250</Property> <Property name="links"> [ {"desc":"ColdBox API","href":"http:\/\/www.coldboxframework.com\/api\/"} ,{"desc":"ColdBox SideBar Help","href":"http:\/\/ortus.svnrepository.com\/coldbox\/trac.cgi\/wiki\/cbSideBar"} ,{"desc":"ColdBox Credits","href":"http:\/\/ortus.svnrepository.com\/coldbox\/trac.cgi\/wiki\/cbCredits"} ] </Property> <!-- Used for Skinning --> <Property name="width"></Property> <Property name="visibleWidth"></Property> <Property name="imagePath"></Property> <Property name="imageVAlign"></Property> <Property name="cssPath"></Property> </Interceptor>
Interceptor Properties
| Property | Type | Default | Description |
| baseAppPath | String | The url path to the index.cfm file. Example: /myapp/index.cfm. Mostly used when using proxy relocations. Else leave blank | |
| yOffset | Numeric | 50 | y offset from top of screen |
| isScroll | Boolean | false | Enables/disables scrolling |
| slideSpeed | numeric | 15 | Speed of sliding in/out (milliseconds) |
| waitTimeBeforeOpen | numeric | 0 | Wait time before sliding out (milliseconds) |
| waitTimeBeforeClose | numeric | 250 | Wait time of sliding in on mouse out (milliseconds) |
| links | json | ColdBox API, ColdBox Credits, ColdBox SideBar Help | Link collection |
| width | numeric | 200 | Total width of the ColdBox SideBar |
| visibleWidth | numeric | 12 | Visible width when ColdBox SideBar is hidden |
| imagePath | string | /coldbox/includes/coldboxsideBar/ColdBoxSideBar.png | Image on the right side. Must be a full path from your application's root. |
| imageVAlign | string | middle | Alignment of the image on the right side. top/middle/bottom |
| cssPath | string | /coldbox/includes/coldboxsidebar/_ColdBoxSideBar.css | StyleSheet use by the ColdBox SideBar. Must be a full path from your application's root. |
Best Practise: Use The Environment Interceptor
Normally you don't want to enable the ColdBoxSideBar in live environments, it's a development gadget. So the best way to go is by using the environment interceptor!
Short explanation of the environment interceptor
config.xml.cfm settings are your settings for the live server, the environment.xml.cfm are config settings which are overwritten when running the application on a development or test server.
Follow these steps to setup the ColdBoxSideBar:
Step 1: Setup Environment Interceptor
Step 2: Disable ColdBoxSideBar on Live Server
Coldbox.xml.cfm:
<Setting name="ColdBoxSideBar" value="false" />
Step 3: Enable ColdBoxSideBar on Development Server
Add ColdBoxSideBar custom setting:
<Setting name="ColdBoxSideBar" value="true" />
Your environment.xml.cfm should look something like this:
<?xml version="1.0" encoding="ISO-8859-1"?> <environmentcontrol> <environment name="development" urls="localhost"> <Setting name="EnableDumpVar" value="true" /> <Setting name="ColdBoxSideBar" value="true" /> </environment> </environmentcontrol>
Skinning the ColdBox SideBar
Of course, you can skin the ColdBoxSideBar! Take a look at the interceptor properties!
Create your own image and adjust a copy of the stylesheet in coldbox/includes/coldboxsidebar/_ColdBoxSideBar.css.
Make sure you use the right paths though!
Please, send us a screenshot of your custom skin!
Usage
Note
You can only enable the ColdBox SideBar through url (sbIsEnabled=1) if config.xml.cfm (environment.xml.cfm) setting is true
| Feature | Description |
| Show SideBar | Disables the ColdBox SideBar , enable through url: sbIsEnabled=1 |
| Show Debug Panel | Enable/disable debug panel, additional debug features will be enabled if in debug mode |
| Dump Variable | Dumps a variable. Only available in debugmode and if config setting dumpvar=true |
| Open Cache Monitor | Shows the cache monitor. Only available in debugmode. |
| Open Profiler Monitor | Shows the profiler monitor. Only available in debugmode. |
| Reload Framework | Reinitializes the framework (fwreinit) |
| Clear Cache | Clears the cache (ExpireAll) |
| Clear Scope | Clears the selected scope |
| Clear Log | Clears the log of the application |
| ColdBox Live Docs | Opens ColdBox Live Docs |
| Search ColdBox Live Docs | Searches for keyword on ColdBox Live Docs |
| ColdBox Forums | Opens ColdBox Forums |
| Search ColdBox Forums | Searches for keyword on ColdBox Forums |
| Links | Collection of default or custom links |
Attachments
-
ColdBoxSideBar1.gif
(94.7 kB) - added by evdlinden
2 years ago.
Animated gif of the ColdBox SideBar
-
ColdBoxSideBarOpen.png
(29.9 kB) - added by evdlinden
2 years ago.
ColdBox SideBar Open
-
ColdBoxSideBarOnError.png
(180.6 kB) - added by evdlinden
2 years ago.
ColdBox SideBar on error
