On Sep 16, 2005, at 7:08 AM, Boris wrote:
> First - is it possible to include / call a sidebar plugin directly
> from the layout? For example I want my flickr plugin to be
> displayed to be on a specific location in the page. I'm not sure
> how to call this code from my default.rhtml layout in my theme.
Sure, just call render_sidebar(). It takes one parameter, a Sidebar
object. Something like this should work:
flickr = Sidebar.new
flickr.controller = 'flickr'
flickr.active_config = { 'feed' => 'http:/...', 'count' => 8,
'format' => 'square' }
render_sidebar(flickr)
You can also pull the flickr object out of the DB, but that might be
more trouble then it's worth.
> Secondly - is it possible to theme the sidebar plugins, similar to
> the layout of the page. Or is my only possibility to use a CSS?
That's a really good question. I'm not really sure. Worst-case,
just copy the sidebar that you want to theme (look in components/
plugins/sidebars/flickr*) and edit the files that you copied. That
should be all that you need to do. The theme view code will probably
work with sidebars, but I never tested it, and it's probably easier
to just copy the sidebar and modify it to work the way you want.
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/typo-list/attachments/20050916/0ea67e3c/attachment.htm