Customizable Plugin Sidebar locations
For ages, Serendipity has given users the flexibility to move around plugins in the left/right sidebar. Two sidebars were a usual concept for blogs in the days past, and for surely some more days to come.
But some themes, like the Hemingway theme give people a different approach to surrounding their blog content. The result of a porting discussion on the forums lead me to patch our plugin API.
Serendipity 1.1 already support custom theme options (like special navigation bars, colorsets etc.), and what came out of my recent patch is the functionality to define multiple custom sidebars.
With this, you can add a "top", "bottom", "middle" or whatever else sidebar locations to your themes, and put them in the smarty templates using the function {serendipity_printSidebar side="XXX"} wherever you like.
It's as easy as adding a config.inc.php file to your template, add a $template_config array value like this:
$template_config = array( array( 'var' => 'sidebars', 'title' => 'Sidebars', 'type' => 'string', 'default' => 'left,hide,right,bot' ) );(or modify existing config arrays) and save the file. When you now enter your plugin configuration section, you will see each of the sidebar locations next to another, so that you can move around plugins from one to the other location.
There are two things to watchout: If you use locations other than 'left' and 'right', other templates may not output plugins that were put to a location like 'bot'. So if you switch templates, you must watch out on where you put your sidebar plugins into.
The other thing to pay attention: Only use "," to separate the sidebar item names (no spaces!) and never use more than 6 characters for your locations.
Please have a test with these new possibilities, tell us if you like it, and show us the results you made with it!
This functionality has been implemented into recent Serendipity 1.1 nightlies (currently 1.1-beta4)
Trackbacks
Trackback-URL für diesen Eintrag
- Serendipity am : Serendipity 1.0.2 and 1.1-beta5 released
Kommentare
Ansicht der Kommentare: (Linear | Verschachtelt)
Carl am um :
I've trialled this update and it really is as simple to configure as Garvin has stated. By adding this function, Garvin is effectively saying to us all, forget about Serendipity as just a blog tool, now we're a full CMS!
CoSTa am um :
wheee! it WORKS! like a charm... this is what i call flexibility. man, this functionality kick ass. i'm playing with it right now and i'm totally into it. small revolution in serendipity templating garv :). thanks!
deborah am um :
Blog molto interessante