When Personalisation Breaks Rendering Parameters

I’m still working on the third post about configuration, I have to admit that I’ve lost a bit of drive on it.  So I thought I’d change gears a little and share some information I found around rendering parameters and personalisation.  For anyone who doesn’t know what rendering parameters are, I’d suggest this article by Vasiliy Fomichev, which explains them nicely.

We use rendering parameters a fair bit at Codehouse in order to allow editors to control the more presentation-oriented settings without editors needing to duplicate or clone their datasource items.  For example, a call-to-action on one page might have the same content on two pages, but need a different background colour in order to fit the rest of the page.  Developers often forget that the DRY principle can be applied to content too: give the editors the tools so that they don’t have to duplicate content where they don’t need to.

Recently, though, I came across a specific situation where they seemed to be a little broken.

Continue reading When Personalisation Breaks Rendering Parameters

Custom Sitecore Configuration: Part 2, Objects

This post follows on from my introductory post about Sitecore configuration, where I talked about using settings and retrieving XML fragments.  In this post I talk about how you can use Sitecore configuration to instantiate and populate objects of your choosing.  This is useful for cutting down on the amount of mapping code you have to write, without needing to put attributes all over the place.

Continue reading Custom Sitecore Configuration: Part 2, Objects

Custom Sitecore Configuration: Part 1, Introduction

I’ve spent quite a bit of time looking into the way that Sitecore configuration can be used.  It has some fairly novel features in it, and while it’s becoming less relevant as support for dependency injection in Sitecore matures, I don’t think it’s going anywhere.  All the same, it’s quite useful for adding flexibility to your Sitecore customisations, or for piggybacking on to provide custom configuration for your own modules and sites. Continue reading Custom Sitecore Configuration: Part 1, Introduction

Sitecore dynamic site provider

I did a bit of playing around recently with Sitecore’s SiteProvider infrastructure.  Our client wanted to be able to create new websites without needing a developer to set it up for them.  The nuts and bolts of sharing templates and renderings is already well documented, so I’m not going to go into that.  I am going to write a bit about how a custom SiteProvider can be created to avoid the need for developers to add a new <site> entry in the configuration. Continue reading Sitecore dynamic site provider

Setting Sitecore Image field values (updated for 6.x+)

A couple of years ago, I wrote a post on how to assign a Sitecore image media item to an image field using the Sitecore 5.3 API.  As it stands, I haven’t really had need to do this since, but I got asked about it the other day by someone at the office.  So, I thought I’d post a little update to the original article. Continue reading Setting Sitecore Image field values (updated for 6.x+)

Unit Testing Sitecore

Unit testing is a very popular topic, and is a very good practice to adopt.  Unfortunately, as anyone who has worked with it will know, some common Sitecore classes (Sitecore.Data.Items.Item to name one) can’t be mocked with some popular mocking frameworks, and can’t be directly instantiated.  So, the logical solution (to me) is to let your unit tests access the Sitecore API and databases (some others abstract the detail away, but as the saying goes: “Who guards the guards?”).  There have been quite a few different blog articles written about this topic, and people have approached the problem differently. So I thought that I’d share my approach to writing unit tests for Sitecore solutions. Continue reading Unit Testing Sitecore

Sitecore Patch Files

As anyone familiar with Sitecore’s guide of recommended practices, changing the <sitecore> section of the Web.config file directly is frowned upon.  Rather, developers should use things called Sitecore configuration include files, or patch files.  By default, these are stored in the /App_Config/Includes folder of the website.

There are plenty of blog articles about them on the internet, however there was one specific feature that seems to be relatively unknown: the set namespace. Continue reading Sitecore Patch Files

Setting Sitecore ImageField

Update: this post uses an older version of the Sitecore API. For an up-to-date solution, please see this updated article.

Recently I had to write something to allow users to upload their own content on a Sitecore site. Not an unusual, or especially difficult, piece of functionality but one thing that did give me a bit of trouble was associating uploaded images (in the media library) with the Sitecore item’s image field. Continue reading Setting Sitecore ImageField

Quick Update

So, I thought I’d ease into what will (hopefully) be another flurry of posting activity with a quick update on what’s been going on here recently.  If you’ve read through earlier posts on this blog then you may well know that I started working at bit10 in September 2007.  I’ve had a fantastic time working at bit10; I’ve learned a great deal and met many people with whom I’m hoping to keep in contact.  However, as with all things, I think that it’s become time to move on. Continue reading Quick Update

Sitecore v6.0

Yesterday I took my “upgrade” certification exam to upgrade my Sitecore 5.3 certification that I obtained last August to to the recently released version 6.0. Sitecore is a highly adaptable and extremely powerful CMS that bit10 chose as its CMS of choice.  After reviewing a fair number of competing offerings (including Amaxus and Ektron), we found Sitecore to be a superior offering. Continue reading Sitecore v6.0

ASP.Net MVC Framework – Initial Thoughts

Having just completed a relatively large project using the newly released ASP.Net MVC Framework, I thought this would be a good time to post my thoughts on the framework.  I have to say that the bulk of my experience with MVC framework comes from my time using Ruby on Rails, so many of my perceptions will be coloured by this. Continue reading ASP.Net MVC Framework – Initial Thoughts

PHP4, IIS6 and 64-bit Windows 2003 Server

If anyone had asked me how to put these three things together a week ago, I would have cringed; my next reaction would be to suggest upgrading to PHP5, using Apache, and one flavour or another of Linux.  Unfortunately that wasn’t possible at this point so, armed with the usual developer tools (that is, the F1 key and Google), I set out to get things set up… after all, how hard could it be?
Continue reading PHP4, IIS6 and 64-bit Windows 2003 Server

Matt Gets Certified

Being my first “official” certification, I figured I’d give it a mention.  A couple of weeks ago I got sent down to London to do some developer training for a CMS that we’re going to be using quite a bit at the company I work at.  At some point, there’s also going to be some interesting work porting existing customer sites to the Sitecore platform.
Continue reading Matt Gets Certified