Archive: August, 2011

Using Short IDs

August 30, 2011
Tags: Sitecore

If you've ever worked with Sitecore for any length of time you've worked with an item ID. It's in the form: {7294ECFC-0C37-44AD-B728-ABA259B18889}. There are times when you need to pass the ID around through querystring values or other visible locations but don't want to deal with all the troubles of encoding/decoding the entity characters or just because it's damn ugly. You can, however, convert the ID to just it's alpha-numeric character sequence known in Sitecore as a ShortID. When you convert the previous ID to a ShortID and print the value, the result string will look like this: 7294ECFC0C3744ADB728ABA259B18889. It's still a long value but useful in other ways. The following code sample converts a ShortID string value to an item and then back to a ShortID string.

Transform Web Controls In Sitecore Rich Text Editor

August 25, 2011

This article is a follow-up to an article written previously by John West about embedding web controls in Rich Text Editors.

I spent some good time using web controls in the Rich Text Editor to allow content editors to implement complex functionality inline without a lot of strain. It's a step up from using code snippets where you don't want a content editor to have to switch to html mode to set html attributes or other behind-the-scenes elements.

Add Css Classes to Sitecore Rich Text Editor

August 13, 2011
Tags: Sitecore, Wysiwyg

There are lots of ways to add css classes to sites and I've covered how to setup stylesheets for multi-site installations, but if you're only building a single site on Sitecore and you're looking to quickly populate the class drop down, or any of the other rich text editor settings for that matter, then this is for you.