Tag: Sitecore

Clean your XPath

March 01, 2011
Tags: SDN, Sitecore, XPath

While developing with Sitecore you'll probably end up using XPath query to return some results. Since a lot of people will be requiring you to create content items with dashes in the name, for SEO purposes, you're going to need to escape the dashes with "#" (pound) signs as detailed in this SDN Sitecore Query Syntax article. This means you'll need a method to clean your XPath queries. Having done this a few times and integrated mine with other developers versions, here's what I've come up with:

Sitecore Util Classes

February 28, 2011
Tags: Sitecore

If you've ever done a lot of Sitecore development you may have built a lot of tools only to find out that Sitecore itself has a utility that already does what you wanted. After a friend, Mark Ursino, joked about how ridiculous the Sitecore.MainUtil.True() method was I looked around and remarked how many times I bumped into a new found util class. I then asked myself just how many util classes Sitecore had so I popped open the object browser and did a quick search. The number: a staggering 31 utility classes. That's a ton of good code that you don't have to write. Some real nuggets too like the reflector utility. Here's what I found with some method highlights:

Editor Tabs in Sitecore

February 27, 2011

updated on 8/11/2011 regarding the order of the tabs. specifically to the position of the content tab .

So during the course of developing websites for Sitecore there are a lot of opportunities to create custom functionality. One feature that I like to use is a custom editor tab. If you're unfamiliar with the concept then you've seen them and just didn't notice. If you have a media folder selected you'll see options to "upload" or "upload advanced".

Sitecore Layout Comparer Extension Classes

February 21, 2011

So during a project where I was converting a site to new templates for a rebuild, I was automating the creation of the new items and needed to know if the current page had any layout overrides on the item. It was necessary for me to compare each page's layout definition against the layout definition assigned to its standard value. If you've never ventured into the standard fields let alone the raw values of an item you might find this useful. The layout fields are stored as xml and keep references to all devices, sublayouts and layouts assigned to it. I ended up writing a few classes that handles the comparisons. It's not something that's entirely common but occassionally you need to know how to deal with the layouts programmatically. Hopefully someone else will find it useful too.

Sitecore Express

February 05, 2011

If you're a Sitecore developer and you love working on the platform but don't have the money to buy a personal license for your own site, you should check out Sitecore Express. Sitecore released a version of Sitecore 6.0 that directly marketed toward developers for non-commercial use. You'll need to login with your SDN credentials and you'll be mailed an express license. The license runs for a year but as long as you're still a registered developer you can continue to renew it. The system runs directly off the master database which for me is fine. It also mean you can't publish and you won't be using workflow but you still get the content management and template definition. It is a 6.0 version so there are a lot of new features you're not going to get access to but it's a great tool and it'll allow you to use all that high powered code you've been developing between projects.

Adding a button to Rich Text Editor in Sitecore

February 05, 2011

Sitecore is an incredibly good platform that provides a lot of functionality out of the box, but one of the great things about Sitecore is that if there is something custom that you'd like to add in, there's always a way to do it. I'm going to walk through the process of adding a custom piece of functionality to Sitecore's Rich Text Editor. There are a lot of reasons you would want to do this but for the sake of this example we'll build a simple text insertion demo that you can expand upon.