Aus der README:
You see it everywhere, simple little widgets that will be rendered (mainly on the frontpage)
into the site. E.g. Wordpress. I wanted something like that too, where i have partials that do my work and at runtime
i define which Widgets are shown. (All or special groups.)
So i define once in my layout where i want to have the widgets.
E.G. in an left sidebar i want all widgets that belong to group XYZ rendered. (Default is all Widgets)
so i define in my layout:
<div id=”sidebar”>
<%= render_widgets :name => “XYZ” %>
</div>
This will now search the widgets in the Widgetgroup XYZ and render them.
You may define them at runtime using manual defining or what i did was create an Holder.
WidgetHolder.register (in environment) registers all defined using the Method
SimpleWidgets.register_widget(”BlogEntries”, “posts/blogwidget”, :group => “XYZ”)
In the UI (/widgetgroups/show/id) you may drag and drop the widgets and they will now be shown
at the desired place.
Attention: currently an Widget belongs to exactly one group. If this is not desired, tell me, i could change this!
Subversion: http://svn.sjoker.net/svn/railsplugins/trunk/simplewidgets/
Blogpost: http://www.sjoker.net/2007/12/20/simple-widgets-fuer-rails/