Modules with Layout from Parent

Hi Luis and the rest out there!

I´m just playing around with contentbox and a custom module.
What I want to achieve is the following site structure:

–search (routed to module)

–search (routed to module)

The page “de” is the parent node with subpages. All subpages use the parents layout.

I added a route that matches /de/images/ and anything following to my module. There I want to handle a search for example…
My Module does just contain a handler.

The route works and my action from my ModuleConfig is executed. After processing some stuff I want to use the parents layout for rendering the site. I tried to enable/disable

this.viewParentLookup = true; this.layoutParentLookup = true;

but the layout is always expected in “contentbox\views\cfcNameFromHandler\Methodname.cfm”

How can I change this? I do not want to hard code the layouts. So ideally I can “ask” the parent node from search-page which layout is set, and adopt it. Would this be the correct way??

Another Question: How can I inject the module with CB? Because at some point I need to access CB out of my module.

Hope to hear soon from someone.




I guess I am confused at what your module is doing.

As for your other question, the CB Helper can be injected anywhere you like using the alias: CBHelper@cb


Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager: