Interceptors:SideBar

<< Back to Dashboard | << Interceptors Viewer

Contents

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

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.coldbox.org\/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 [[Interceptors:EnvironmentControl | environment interceptor]!

Follow these steps to setup the ColdBoxSideBar:

Step 1: Setup Environment Interceptor

See environment interceptor

Step 2: Disable ColdBoxSideBar on Live Server

<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

You can only enable the ColdBox SideBar through url (sbIsEnabled=1) if the enable sidebar setting is set to 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

 
Download in other Formats:
markup Markup | pdf PDF | html HTML | word Word

comments Comments (2)

orc_pac7@cox.net's Gravatar

orcpac8 said

at 03:15:13 PM 28-Jan-2010

Any chance of getting a quick note as to how to configure in M4, Coldbox.cfc configuration file? Doesn't need explanation, but syntax would be helpful. Getting lost in the nested array of links with multiple properties.
lmajano@gmail.com's Gravatar

Luis Majano said

at 07:49:36 PM 28-Jan-2010

Yes, we will update all the docs soon

ColdBox Book

book