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:

`
-de
–contentsite1
–contentsite2
–search (routed to module)

-en
–contentsite1
–contentsite2
–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.

Regards

Andy

Andy,

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

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano