Manual creation of part's shape

Topics: Writing modules
Mar 24, 2011 at 4:34 AM

Hello,

I have two modules:

Module A: with parts and widgets,

Module B with controller and view.

Is it possible to create "manually" part's shape in controller - module B and pass it to view?

I don't want to create content item. I want just reuse definition of part/widget display.

Thanks

Coordinator
Mar 25, 2011 at 1:44 AM

I suppose you could instantiate the driver and call display on it, but I can't guarantee that will work...

Mar 25, 2011 at 2:10 PM

Thanks for answer. I should ask more open ended question. My goal is to show some widget only for specific controller/action. After studding a little bit more, looks like the better way is to switch layout for specific controller and eventually have widget which will have logic based on route.

Mar 25, 2011 at 4:35 PM

The Layers are used for showing / hiding widgets based on abstract criteria. You could create a custom Layer Rule which will work on Controller / Action (if someone hasn't made one already!)

Coordinator
Mar 26, 2011 at 12:56 AM

If you are using the default routes, the Url route with a wildcard should do the trick. But yes, someone could build a controller/action layer rule.