Typo sidebars: a work in progress
Posted by Scott Laird Sun, 17 Jul 2005 05:37:23 GMT
I was looking over yesterday’s sidebar work and noticed two shortcomings:
- While it’s really easy to add new sidebar plugins (just drop the files into place and it’ll pick them up and make them available for use), that only works if sidebar items don’t need any configuration options. If the sidebar needs to ask the user for configuration, then you need to patch
app/models/configuration.rbandapp/views/admin/general/index.rhtml, which can be kind of non-trivial. - This whole model limits users to only displaying each sidebar type once. Take a look at poocs.net and notice that he has two Tada lists. That’s not really possible with my new sidebar model, short of cloning the
tadaplugin to create atada2plugin, which is ugly.
So, I’m reworking things. I’m allowing users to add individual sidebar items multiple times, and I’m moving the sidebar config data into the sidebar itself, out of Typo’s main configuration system. I’m currently able to create multiple Flickr entries in the database using the new admin UI, but there’s still quite a bit of work left to do.
When this is all done, we should have a really deeply cool drag-and-drop sidebar configuration system that is better then the current system in every way, except perhaps for a bit of complexity. Hopefully it’ll be acceptable to the Typo maintainers.
Update: A screenshot is available.

The drag and drop for adding is good, but the discard action would be a bit more in keeping with the usual paradigm to have a red ( X ) close box. (ala tabs in Colloquy, Adium)
Of course, I’m not sure how easy that is with the framework and scaffolding you happen to be using right now. If you need a hand with this stuff let me know where it is in the svk/svn tree.
That’s not a bad idea. I’m not completely convinced that it’d the best course of action, but it sounds decent enough.
My current sidebar code is available here. I don’t publish changes after every commit, but I usually do it at least once per coding session.
Excellent work - this looks great!
Great - look forward to play with it !!
This is late, but I’ve just recently got Typo running and want more power over the sidebar. Is there any way to filter delicious links on tags, so that I can break my delicious links into subcategories? I also want to be able to control the title of the delicious links, so that it doesn’t just say “del.icio.us/ACCOUNT_NAME”.
Obviously new to rails and stuff, don’t know the best way to make these changes myself.
If you know Ruby, then adding new code to sidebars shouldn’t be too hard. The big problem with del.icio.us is that the RSS feed that we’re using to generate the sidebar doesn’t have a lot of detail, so we’d have to switch to a different method of accessing the site. Is there an API for del.icio.us?
If you aren’t up to programming this yourself, create a new ticket on the Typo site and explain exactly what you’d like and why it’d be useful, and we’ll see what we can do.
I’m into programming, but I’m just learning Rails and Ruby all at once. I’ve modified the delicious plugin so that I can configure the title (heading) and a field for tags, just no means to filter on those tags (yet).
Yeah there is an API for delicious, but all the needed info is in the XML (link meta data). I’ve been looking into modifiying the xml_controller, but I don’t know if that’s what I want to do or not (still learning).
I have created a sidebar component that allows a blog to have two or more sidebars. It doesn’t change any existing Typo code, and it’s really simply to use in a layout.
You can find an article about the component and a simple scribbish derivative theme that uses the component at http://blog.emarm.com/articles/2006/08/09/multiple-sidebars-in-typo.
>You are welcome to include it in Typo at some point.