« Archives in March, 2011

The Sitecore Gutter

No, this isn’t a sad article about unemployed Sitecore developers. And I’m still gainfully employed, thank you very much.

Instead, this article is about a Sitecore feature that a colleague pointed out to me recently. I hadnĀ“t noticed it before, but it seems pretty useful to me.

When you right-click in the bar left of the content tree, you’ll get a nice dropdown allowing you to select an option (or multiple options). It’s called the quick action bar, but I call it the gutter (I’ll explain later). There are some very useful options there that can give you a quick insight into what’s going on with your content items and you can also use it to manipulate the items.

For example, I’ve found the “Presentation Overriden” option to be quite useful. If selected, it displays an icon next to any item that does not have the standard presentation settings from the item’s template selected. This can prevent annoying problems, if you accidentaly changed the presentation settings for an individual item and you don’t see why the changes on the standard values seem to have no effect. You can click the icon to remove the overriden settings.

Anyway, this function gave me an idea: what if you could control the behaviour of the icons in the gutter dynamically, say, through the Sitecore rules engine? That would be pretty cool, because you would not have to do any coding to quickly see what items comply with a certain condition.

So I got to work, and quickly found the icons in the core database (/sitecore/content/Applications/Content Editor/Gutters). This is where I got the name: since the items are called GutterRenderers, it only seems logical to call it the gutter (or not… whatever).

I added a new item with the right template (/sitecore/templates/Sitecore Client/Content editor/Gutter Renderer) and set the values as displayed in the image below.

Please note that the datasource and fieldname point to an item’s field in the master database. That item’s field is a “Rules” field and can be used to set the condition.

All that was needed now was to implement the RuleBasedGutterRenderer.RuleBased class. Which is what I did:

So now all you have to do is set a rule in that field and you are ready to go (be sure to clear the Sitecore cache and refresh the Sitecore desktop after changing the rule).

CompiledDomainModel 0.4.0.0 released!

I’ve been working on my code generating Sitecore module called CompiledDomainModel. We’ve been using the module on a project for a large energy company’s website. As it is the first real project that the module is being used on, we obviously found some bugs and we needed some extra features. Some of the feedback has been used to make some changes to the module. These changes have now been included in a new release (version 0.4.0.0).

This release also includes a code generation template that can be used to generate a WCF service (experimental). It is possible for any application that can consume a WCF service, to read and write content to Sitecore. And all of this can be done in a typed way: e.g. a template called Product with fields ProductId, ProductName and ProductDescription will be available in the WSDL as a type.

I’ve also created a demo Silverlight application that can consume the WCF service. It’s similar to the RSS feed reader demo application. But I haven’t created a package that can be downloaded for it. If you want to run the demo application, you’ll have to get it from the shared source SVN repository.

Working with the module has been making my daily life as a Sitecore developer (increasingly) easier. I’ve been getting some good feedback from my colleagues, who are generally quite positive about it as well. It takes a bit of getting used to, but you will see many advantages once you get into it. It’s been great seeing the fruits of my labour!

If you’re not getting what this post is about exactly, then check out the demo video I made a while ago.

Sitecore taskbars wallpaper

Place this file in your sitecore\shell\Themes\Backgrounds directory and change the wallpaper in your Sitecore backend by clicking (right mouse button) the desktop and selecting “Properties”. Your desktop will look like this:

Taskbars wallpaper

UA-4216957-1