Two New Features that Stood Out at Sitecore Symposium 2016

The 2016 Sitecore Symposium that took place September 14-16 in New Orleans was a true mix of “work” and play. One of my favorite things about symposiums is the quality of the speakers and the content that they are able to deliver in such a short period of time.
As usual, we had Michael Seifert and his partner in crime Darren Guarnaccia put on an awesome opening keynote demonstrating some of the new things Sitecore has to offer. Two features in particular really caught my eye: the Sitecore Experience Accelerator (SXA) and Sitecore Commerce.
Here are the aspects of each feature that I am most excited about.

Continue reading


Add Help Text to Field in Sitecore Page Editor

It is very common for content authors to need a little extra assistance when entering content through the page editor.  For example, they may be uploading an image and need to know what the recommended dimensions are.  Instead of having to reference an old email from the developers who built the site or dig up an old conversation in Basecamp, you can now provide this information to them right in the page editor.  Below is an example of what this looks like.


Continue reading

Hours of Operation Custom Field Type

Frequently when building Sitecore sites, the need has come up for the content author to be able to enter the hours of operation for their business. Unfortunately there is no built-in field type in Sitecore and nothing on the Sitecore Marketplace.  With the help of two of my colleagues, Aaron Ladage and Patrick Delancy, we created a custom hours of operation field type.  Our type allows content authors to easily enter opening and closing times for each day of the week.  The value is stored as XML and can be easily parsed not only to display for website visitors, but also to add the proper microdata and boost the website’s SEO.

Continue reading

Using Sitecore Configuration Factory For Basic Dependency Injection

Dependency injection in .NET has become fairly commonplace and there are many popular frameworks out there to do so.  If you’re embracing the philosophy of building generic re-usable pieces of functionality, you may not want to tie yourself down to one particular technology.  Fortunately Sitecore provides a solution that will allow you to easily use different IoC frameworks between projects.  This post will describe how to utilize the Sitecore configuration factory for basic dependency injection.

Continue reading

Extending Web Forms for Marketers Form Report Export

Web Forms for Marketers provides a great feature called form reports which gives you access to every web forms form submission.  Sitecore provides you with two formats for exporting these records.  You can export them to an Excel document (.xls) or to an XML document (.xml).  However, your users might want to export the records to other formats.  This post will describe how to add your own custom export button using a format of your choosing.

Continue reading

How To Create Sitecore Scheduled Task

To create a scheduled task in Sitecore, first you must create the .NET class that will contain the logic that you wish to execute.  In the example below I’m simply logging a message whenever the task is run.

public void Execute(Item[] items, Sitecore.Tasks.CommandItem command, Sitecore.Tasks.ScheduleItem schedule)
Sitecore.Diagnostics.Log.Info("My Sitecore scheduled task is being run!", this);

view raw


hosted with ❤ by GitHub

Your method must accept three arguments.

  1. An array of items that can be specified in a later step when you define the command’s schedule.
  2. The Sitecore task CommandItem
  3. The Sitecore task ScheduleItem

Continue reading

Sitecore.Links.LinkManager and the context

Brian Pedersen's Sitecore and .NET Blog

A new feature in Sitecore 6 is the LinkManager. Previously, in Sitecore 5, in order to get a friendly url (an URL with the .aspx extension) you would write the following:

In Sitecore 6, the GetFriendlyUrl() is deprecated. Instead we are encouraged to use the Sitecore.Links.LinkManager. The same piece of code would look like this:

The LinkManager provides us with a lot of features that the GetFriendlyUrl() did not. But it also introduces some pitfalls. The LinkManager runs in a context that is not necessarily the same as the Item you are getting the link from, nor the context you wish to run in. Let me explain. Imagine you write a Sitecore shell extension that returns the path to an item. The Item is grabbed from the web database:

The path to the item is “/sitecore/content/home”.

Now, lets get the item’s URL:

This returns the item URL for…

View original post 181 more words

Web Forms For Marketers MVC – Terms of Agreement Custom Field Type

Recently the Web Forms For Marketers Module for Sitecore has released support for MVC.  With that, lets go over how to create a custom type to be used on your MVC form.

First you’ll need to add a new type under the Field Types folder.


Now in your Visual Studio project, create a new class TermsAgreementField.cs that inherits from CheckBoxField.

using Sitecore.Data.Items;
using Sitecore.Forms.Mvc.Attributes;
using Sitecore.Forms.Mvc.Controllers.ModelBinders.FieldBinders;
using Sitecore.Forms.Mvc.Models.Fields;
using Sitecore.Forms.Mvc.Validators;
namespace MyProject.Integration.Wfm
public class TermsAgreementField : CheckBoxField
public string TermsLabel { get; set; }
[DynamicRequired("IsRequired", ErrorMessage = "The {0} field is required.")]
public override object Value { get; set; }
public override bool IsRequired
get { return true; }
public TermsAgreementField(Item item) : base(item) {}

Note here that I have made this a required field by making IsRequired always return true.

Continue reading