what I am trying to do might be weird, but, it makes sense with the app I'm building: instead of rendering just a single $content into a layout, each page has two "panels" of content: a $rightcontent and a $leftcontent. I would like to generate the $rightcontent with one controller, and the $leftcontent with another controller. what would be the best way to do this?
I've had a few thoughts so far:
- somehow override the default request handling so that ?r=leftcontroller/rightcontroller calls two controllers and renders the indexAction view of both into the layout file
- route everything through one controller (siteController maybe), and simply render two Widgets (ignoring the regular $content)
(if this will work, how much can a widget be associated with a controller? CWidgets have "controller" and "owner" properties which refer to Controllers... what do these do?)
- pass in to 1st controller's action the name of the 2nd controller, have it call an action in the 2nd controller with a partialRender() output, and then pass the content from the 2nd controller back into the regular render() function in the 1st controller's action
any thoughts? I'm sort of new to this whole MVC thing anyway, so perhaps I'm overlooking a simple solution.