ColdBox SideBar

Introduction

Well, because an image says more than 1000 words...

Animated gif of the !ColdBox !SideBar

Sure, the ColdBox SideBar still works on exception...

!ColdBox !SideBar on error

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

Note for Security Interceptor : The Security interceptor's declaration needs to be done AFTER the ColdBox SideBar interceptor's declaration

<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

PropertyTypeDefaultDescription
baseAppPathString The url path to the index.cfm file. Example: /myapp/index.cfm. Mostly used when using proxy relocations. Else leave blank
yOffsetNumeric50 y offset from top of screen
isScrollBooleanfalse Enables/disables scrolling
slideSpeednumeric15 Speed of sliding in/out (milliseconds)
waitTimeBeforeOpennumeric0 Wait time before sliding out (milliseconds)
waitTimeBeforeClosenumeric250 Wait time of sliding in on mouse out (milliseconds)
linksjsonColdBox API, ColdBox Credits, ColdBox SideBar Help Link collection
widthnumeric200 Total width of the ColdBox SideBar
visibleWidthnumeric12 Visible width when ColdBox SideBar is hidden
imagePathstring/coldbox/includes/coldboxsideBar/ColdBoxSideBar.png Image on the right side. Must be a full path from your application's root.
imageVAlignstringmiddle Alignment of the image on the right side. top/middle/bottom
cssPathstring/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

See 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

FeatureDescription
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