Upgrade Sitecore Glass Mapper from v2 to v3

I recently upgraded a project from Glass Mapper v2 (Glass.Mapper.Sitecore) to Glass Mapper v3 (Glass.Mapper.Sc). I’ve been fortunate enough to be using Team Development for Sitecore (TDS) with most of my projects over the past few years, which really simplifies generating a default set of Glass Models using the T4 Templates which are available from the Hedgehog Codegen repo on GitHub. The upgrade process was simple enough (NuGet FTW!) but thought I would share some issues I came across that took a little bit of time to resolve.

The upgrade was to fix some unrelated issues we were facing, but since the v2 Glass project seems to have disappeared off the face of the earth (annoying that an entire GitHub repo just gets deleted like that rather than left for historical purposes…) it seemed like a good idea to remove this dependency at the same time.

Read More

Site Specific Link Provider for Multisite Implementation in Sitecore

I’ve been using this Site Specific Link Provider for a while now and have been meaning to blog it for some time, a couple of recent blog posts from John West and the addition of the new LinkProviderSwitcher to Sitecore 8 about prompted me to finally get my thoughts onto keyboard. When I read that a new LinkProviderSwitcher had been provided I got a bit excited that we may finally have site specific link provider, alas it was just a way of allowing us to switch the provider inside a using block.

Some of you may be aware that Sitecore has allowed us to define multiple Link Providers for some time, we just add multiple providers to the linkManager config section, but it hasn’t really provided us a nice way of utilizing that functionality without hard-coding it:

Sitecore.Links.LinkManager.Providers["myCustomProvider"].GetItemUrl(item,options);

Read More