Hi all, this is a question for the sidebar experts. I'm interested in having access, from the sidebars, to information from the main controller. I.e., I'd like to write a couple of sidebars for the article controller, and its display action, that show the main page article's trackbacks, or metadata, or comments count, or whatever. I could obtain the id from the request and do a search for it, but ideally I should be able to directly obtain the main controller's @article. Is there a way and I am missing something obvious, or should a mechanism be ideated to pass the @article from the main controller to the sidebars? I've tried using the flash object but doesn't work (or I'm not using it correctly). Any ideas? TIA cheers, Victor
on 2006-04-11 02:05
on 2006-04-11 03:09
Victor J. <firstname.lastname@example.org> writes: > Is there a way and I am missing something obvious, or should a > mechanism be ideated to pass the @article from the main controller to > the sidebars? I've tried using the flash object but doesn't work (or I'm > not using it correctly). The sidebar gets passed the 'contents' being rendered, which is a list of the articles/pages/comments/whatever that's being displayed on the current page. That's probably what you want. Take a look at how the Amazon sidebar works.
on 2006-04-11 11:22
Excellent! thanks Piers! Victor