A powerful selling point of Sitecore is the amount of customization that it provides to developers. A common requirement I've been faced with numerous times is providing content editors with some bespoke functionality that they can trigger themselves. Some examples of these types of scenarios are importing content from Wordpress, exporting content into RSS feeds and refreshing data generated from a third party system.
When you get faced with these types of scenarios, a really cool and useful feature of Sitecore is to be able to create your own tab in the Sitecore ribbon with some custom buttons that trigger your custom code. In today's tutorial, I'm going to cover the code required to achieve this and how you can configure Sitecore to use it.
public class DoSomeWork : Command
private static readonly object Monitor = new object();
public override void Execute(CommandContext context)
if (context == null)
ProgressBox.Execute("JOB NAME", "Title", "Applications/32x32/refresh.png", Refresh);
catch (Exception ex)
Sitecore.Diagnostics.Log.Error("Error!", ex, this);
public void Refresh(params object parameters)
// Do Stuff
Software Architect, Programmer and Technologist Jon Jones is founder and CEO of London-based tech firm Digital Prompt. He has been working in the field for nearly a decade, specializing in new technologies and technical solution research in the web business. A passionate blogger by heart , speaker & consultant from England.. always on the hunt for the next challenge