Question about module layouts?

If I have a custom module with a layout defined in the modules layout folder and want to use CBHelper things like cb.layoutRoot() or cb.quickView or any “cb” method…how do I do this?

Also I tried setting this.layoutParentLookup = true; to use a layout in the contentbox active layout but it looks in the root application layouts, not contentbox’s active layout?

Let me know.


Hey Isaac,

To use the CBHelper, you just use #cb.method()# in your views or layout. The renderer, that is used, injects this into the RequestContext to be used in your views and/or layout. Can you give an example where that is not working?

As for your second question, are you talking about ContentBox modules or standard Coldbox modules, there is a difference. Could you explain more on this, as I fail to see why you would use another view for look and feel, and not go with a theme?

I have a module I created in the /modules/contentbox/modules/ folder named /app/

in my “app” module I want to use a layout from my theme? How do I do this.

By default, and I don’t see any need to change the behaviour, is that all ContentBox modules will use the theme being used by ContentBox.

Can you elaborate more on whether this is a ContentBox module or a ColdBox module, what is the module’s sole purpose?

Could you explain the difference between the two, perhaps I am doing it wrong. If I create a module in content box how do use it? There is no documentation on any of this (just a “placeholder” in the docs) so I am shooting ion the dark.

I am creating the module in the /modules/contentbox/modules/ folder under the folder /app and activating it in the administrator. /app is a mini coldbox app with event handlers models and views, I want to use it to custom program some cool things like pages to select DJ’s and listen to mixes.

So when I access the module in the url by going to index.cfm/app which it the entry point for my module and then to index.cfm/app/mixes where mixes.cfc is an event handler in /app/handlers/ I want to have the index event in mixes get data and render a view.

How do I use the theme I created that is being used by ContentBox? So far I have not been able to figure this out. it either looks for a theme in the modules /layouts folder or in the root /layouts folder, never in my current active theme.

Am I using modules wrong?

I notice when going to the module shipped with contentbox HelloContentBox in the url after activiated for example


it errors, Error Messages: Element CBROOT is undefined in PRC.

How would I use the HelloContentBox module on a contentbox page?


Try some of these posts by me…

If you have any more questions, will be happy to answer them.

Thanks I will dive in and see what you have.