Theme your Module
Step 1 : CBHelper Class
component{
property name="cbHelper" inject="CBHelper@cb";
}Step 2 : prepareUIRequest()
/**
* Prepare a ContentBox UI request. This sets ups settings, theme, etc. This method is usualy called
* automatically for you on the UI module. However, you can use it a-la-carte if you are building
* ajax or module extensions
* @layout An optional layout to set for you in the request, taken from the chosen theme
*/
CBHelper function prepareUIRequest( string layout );function listData( event, rc, prc ){
// get some data
prc.data = myservice.getData();
// Tell ColdBox to use the ContentBox theme
cbHelper.prepareUIRequest();
// set view to render
event.setView( "general/data" );
}Step 3 : Build Cool Stuff
Last updated
Was this helpful?
