Hi, I would like to have a 'sidebar' that calls 'secondary' actions. Sometimes only one action in the sidebar, sometimes several. Which actions are called will be dependent on the currently matched route. They will either be lists of static links to external sites, or dynamically generated internal links (most recently added data to some some models): so I think at least two different actions will be required.
I know I can have a fixed slot in a layout that calls an action: say just like the menu action in the sample app. As far as I can tell, this slot behaves independently of the matched route. As I found out at http://groups.google.com/group/agavi-users/browse_thread/thread/73240737fe19812d , this can be easily changed using: $request->getAttribute('matched_routes', 'org.agavi.routing'); for example, to choose which menu item to add a class 'currrent' to. For the sidebars, I could have a fixed 'sidebar' action called in the layout. I think I could, in the view for the 'sidebar' action, use the 'matched_routes' parameter to choose between actions to put into 'sub' slots. This would be by some switch / if block. I guess the sidebar could be termed a proxy action. However, this seems a bit more of a routing/layout issue than something that should go in a view. Is there another, better, way of achieving this? Or is there in fact nothing wrong with this approach? Michal. _______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
