Maintaining sub-blogs: Turn a category into its own blog

Thanks to some suggestions on the forums, especially by Robert Lender and Marc "Col. Kurtz" Gärtner, I have contributed a plugin that allows basic modification of a category into its own blog.

First off, the changes needs a fresh 0.9 SVN checkout, as some important plugin hooks were added to support the changes. On top of that you will need the new plugin serendipity_event_categorytemplates ("Properties/Templates of categories"), which is put into CVS and will be available via Spartacus shortly. You may also need the serendipity_event_sidebarhider ("Toggle Sidebar state") plugin for some advanced usage.

Now let me describe what the plugin does. It adds three new fields to the properties of each category. There you can now define the individual template used when viewing that category, define the amount of entries to be pulled (fetchLimit) and define whether the category is allowed to show entries of the future or not. All those settings override your global default, when a visitor comes to your page.

You need to enter the relative path for the template into the input box - a select dropdown may get available in the future. You can not only choose a different maintemplate ("blue", "kubrick", "moz-modern" etc.) - you can even select a sub-template of your template. Like "kubrick/category1", "kubrick/category2" and so forth. The directory structure of a "sub-template" is the same as a completely different template. So you have all options to fully tweak your templates dependant on the selected category.

Now, wouldn't it be nice to only show certain sidebar plugins on specific categories? For that, you can use the Sidebarhider plugin. You can toggle a list of categories that is allowed to display each sidebar plugin. That means you might want to show the Calendar plugin in Category A, B and C - but not in category D. Or you might want to show a special HTML nugget only in Category A. No problem. :-)

Of course there might be some bugs popping up, which is why it also requires Serendipity 0.9. Feel free to report errors on our bugtracker, the forums, mailinglist or whatever you prefer. I personally prefer the Sf.Net Bugtracker, though.

This extra flexibility is just another brick in the wall of showing the nice featureset of Serendipity, and what can be achieved with plugins. Be inspired and have fun!

The Flexibility of Serendipity

Killersoft SerendipityToday I received a note from Clay Loveless, the owner of killersoft.com. Clay is a PHP-developer and contributor to PEAR and PHP-related magazines.

He is using Serendipity in a very custom-tailored environment and with the help of Smarty and Serendipity's templating methods he was able to show off how flexible Serendipity can be bent in several directions - even into a distinguished miniCMS-Portfolio site.

I really like the smooth look of his page - go ahead and look at it yourself; if you do as well, drop him a note! Clay is also looking into PEARifying Serendipity and how to make our plugin infrastructure more fit to PEAR. Let's hope he will succeed. :-)