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.

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