Sidebar Manager is not just a plugin, it is a platform. One of the core principals of Sidebar Manager is to provide other plugin developers with a tool they can leverage in delivering cool functionality to their users. For example, suppose you are Tim Appnel. You could have your Feeds.App plugin install an RSS feed widget into Movable Type. Users could then add that widget to their sidebar in a click of a button, using the Sidebar Manager plugin and platform.
The following is a snippet of Perl code that shows how to create a sidebar widget that can be integrated with Sidebar Manager. As you can see, all you need to do is create a template module with a name prefixed by “Sidebar: ” and Sidebar Manager will assume it is a side widget to be manipulated.
require MT::Template;
my $tmpl = MT::Template->new;
$tmpl->blog_id($blog_id);
$tmpl->type('custom');
<b>$tmpl->name('Sidebar: Example Widget');</b>
$tmpl->text(<<END_TMPL);
Your template code goes here.
END_TMPL
$tmpl->save;
No Comments
Leave a comment