Debugging Sitecore pipelines

A quick tip for checking data flowing through the Sitecore pipelines is to setup empty processors and then move them sequentially through the required pipeline.

An example for the pipeline:

Then add your debug point and dig into the args.

Some example usage for checking which site has been resolved:

Sitecore Gutters for updated presentation

Sitecore gutters are a great way of seeing quick summaries of content within the tree. Some existing gutter options include Locked Items, Workflow State, Missing Versions and more. These can be toggled by right clicking in the left column of the content editor.

Its easy to build custom gutters – in the example above we have a new item available – ‘Custom Presentation’. When this is active on an item it shows:

Behind the scenes there is very little code to achieve this:

Gutters then need to be added to the core database at ‘/sitecore/content/Applications/Content Editor/Gutters

Setup custom Sitecore MediaProvider

One of Sitecore’s most useful features is the plug-ability of functionality via the configuration factory. Its very easy to add or update custom implementations where necessary.

A typical programming model used throughout this is the Provider model – Membership, Roles, Item, Proxy… the list is endless. Unfortunately one provider thats not exposed in the config factory is the MediaProvider.

No problem, thanks to some help from support they suggested a way to get around this, you can tap into the initialise pipeline. Here is the patch file to enable this:

This pipeline runs as the application intializes. Next you need the implementation of the pipeline processor:

And finally the custom implementation:

Our customization allowed us to push certain media extensions to known file types.