Project Lifecycle

Linq to Sitecore

April 5, 2013

I wanted to write up an article that elaborates on a presentation I gave on some but not all of the new features that will be upcoming in Sitecore 7. Mostly I'm going to focus on the updates around Lucene search but I'll also touch on some of the other features as well. This will be a longer article so be warned.

I'd also like to preface this article by saying that one of the driving forces behind much of the change in Sitecore 7 is an increasing need to support large data sets. And don't dismiss this release thinking that there isn't a lot of value if you're system isn't that large. You don't

...

Browser Language Detection In Sitecore

April 1, 2013

I recently had a request to detect the browser language for a multilingual site I support. Now this certainly isn't anything new and here's the canonical/obligatory John West post written about it. I'm not trying to rewrite what he's done. My solution is different and deals with different needs. The requirements I had were:

*set the context language to the browser language if the site has item versions in that language*if the user changes the language through a dropdown selector maintain the new language settings

These seemingly innocuous requirements add more complexity than you'd expect. The c

...

Sitecore Data Importer Updated

March 2, 2013

I recently spent some good quality time working to update the Data Importer Module. It's an incredibly useful tool and I wanted to address some feedback about it so that users can better understand what it can do and how you use it.

The module was originally developed to import content from existing websites into Sitecore. I had to pull all types of information from raw SQL databases used by other CMS'. It can save a lot of time and effort doing these imports because you create the import definitions they are stored in the Sitecore content tree and you can rerun it as needed. It helps when you

...

Sitecore Caching Manager Updated

February 28, 2013

I've recently updated the Caching Manager module on the Sitecore Marketplace. The improvements were focused on the UI which I've made to mimic the native design of the content editor. It's a lot more compressed and easy to use. The different cache regions are broken into separate tabs and parts of the form are broken into sections. You can collapse the sections by double clicking on the title bar like you can in the content editor. There's use of Sitecore's icons and the buttons are better defined and the font size is smaller so that more fits on a screen.

There was also an update by Mark Ursi

...

Adding Fields To The Link Database

February 14, 2013

This article details how to add fields to the Link Database, how Sitecore uses the FieldTypes.config to add items to the Link Database, issues with the DelimitedField type and how to create your own custom type to use in the FieldTypes.config.

Adding Fields to the Link Database

Setting up new or custom fields is pretty straight forward. In my initial research I found this article by John West to be quite helpful. There's two parts to getting a field setup with the link db: setting up the config entries and rebuilding the link db. You can add entries to the FieldTypes.config file or your own cu

...

Site Specific Insert Option Rules For Sitecore

January 18, 2013

I recently had the need to add a new template type for a single site on my multi-site system and wanted to be able to provide insert options for this template on content folders only in this site. The content folders are a global template and are shared across multiple sites so adding this new template type to the insert options of the content folder was not a viable option.

I know, from previous experience that rules engine would be great solution for this but there were a few additional constraints that I had which the default settings didn't provide for. I wanted to limit the scope of the ru

...

Include File References Patch Issue

January 18, 2013

*Update 2

I also found that there was an issue with the <using> statements as well that required an attribute to be added. When I opened the Configure-Assign (Insert Options) or tried to add from template, I would get the following exception:

The type or namespace name 'EventArgs' could not be found.

Once I added an arbitrary attribute to the <using> tag it was fine.

*Update 1

So Sitecore Support got back to me pretty quickly and told me that if I just add an attribute that makes the reference unique that's how to solve the issue. Here's the relevant code:

<?xml version="1.0"?>
<configuration xmln
...

Item Buckets by Tim Ward

October 24, 2012

After the last mind blowing talk by Tim Ward I decided it would be prudent to catch this talk about breaking the million item mark with content buckets. As if simply storing this much information wasn't enough of a challenge, he was also trying to solve the problem of quickly querying this data set based on a bit of meta information.   

Ultimately there are a lot of ways you can approach this kind of problem with varying degrees of success, but like the precocious individual he is, he decided on a custom solution called "Item Buckets".     

The item buckets are parent nodes that work in concert

...

Velir Field Suite Module

October 24, 2012

I'm catching the talk on the field suite module presented by Tim Braga from Velir. I'm all about anything that improves the default set of fields provided out of the box from Sitecore. He was Also good enough to post the field suite module to the shared source modules.      

The first field he chose to deal with the multilist field. It becomes immediately obvious that there are some shortcomings in its usability. The list of selected items don't offer much in the way of context for where those items may be located in the content tree, whether or not they're published or, god forbid, the differe

...

Using the Powershell With Sitecore

October 24, 2012

Sitecore and the powershell is a talk I've been looking forward to for a while. I'm a one man team so my life revolves around automation. The thought of being able to streamline my process and shave time off the labor intensive tasks that I engage in regularly, easily keeps my attention.     

So the powershell is a windows utility that is built on top of the .NET library and provides a deep level of access to the system. The presenter is using, as an example, the task of installing a Sitecore instance through a powershell script. It's can be a common and time consuming task especially if you wo

...

Keynote With Gary Vaynerchuk

October 24, 2012

I'm back at it at Sitecore Symposium day 3 in the keynote session with Gary Vaynerchuk. Still a little groggy from last night at Haze tearing it up with all the die hard Sitecore employees, partners and clients.     

Gary opened with a joke about how few people at the conference knew who he was despite his large twitter following. He followed up with a brief history of his innate business prowess leading into how he methodically approaches business and sales. His skill isn't just in taking advantage of the bleeding edge of technological innovation to increase sales through focused customer enga

...

Sitecore Multiple Site Solutions

October 23, 2012

Multiple-site solutions are one facet of the Sitecore ecosystem that I'm intimately familiar with so I'm really looking forward to see how other developers have solved the problems that tend to crop up.    

The talk began by focusing on problems that multiple sites produce such as user/group management, deployment problems across multiple regions and disparate code management.    

For as long as I've been a Sitecore dev I haven't heard a lot about Foundry 4  but it looks like this will be my opportunity. It looks like the focus of foundry is really churning out sites quickly, which I did know bu

...

Sitecore Mobile Framework

October 23, 2012

Sitecore's "ultra cool mobile framework" will prove to be a defining moment in their ability to surf the frenzy that is the internet. With an exploding population of netizens hailing from their mobile devices those who can't adapt will undoubtedly pay for it with less engaged, more frustrated users dropping off. Developing a mobile strategy can be a difficult task but Sitecore looks to be poised to help developers handle that task.    

The SDK will be built using JQuery and JSON which should give developers a lot to leeway to develop solutions far a variety of mobile devices.    

iOS, being as d

...

Enhancing Lucene Search

October 23, 2012

So I'm attending the "Enhancing search for Lucene" because I've been using Lucene lightly for years but haven't had the time to fully vet it for more mainstream use. I love it for its speed and flexibility but I have lingering questions about the memory/cpu costs while rebuilding large indexes on production servers. Overall I just want to get a feel about how other people are using it and any pitfalls they've run into.    

The talk starts with a use case which as a developer always makes sense because there's a certain level of nuance that is hard to replicate with hypotheticals. The challenges

...

Sitecore Brightcove Connector

October 23, 2012

I'm extremely excited about the number of people who are in attendance for the Brightcove Sitecore connector. This was as you may or may not know a labor of love for me since it's built off of my open source library Sukiyoshi on Google Code

Agency Oasis did add a number of features into the original connector such as automated system syncs, video sublayouts, patch configuration file, the analytical tracking for player events, tighter process queue control, the lucene search fields and the use of snippets instead of web controls.

This is of course a free module built on free open source softwar

...

Developer Keynote

October 23, 2012

The developer keynote was kicked off with the venerable Lars Nielsen whose presence implies Sitecore has been able to maintain its brain trust through it's explosive growth over recent years.

Getting into the nitty gritty, enhancement and stability are what Sitecore is focusing on this year. 

The integration with InDesign seems to be more on the enhancement side of the coin where marketers will be able to merge their print materials into their work stream.

Foundry: another technology that hasn't really received much vocal attention largely because of its targeted use for franchise syndication. 

Ma

...

Sitecore Keynote

October 23, 2012

Immediate: Relevant: Predictive. That's where Sitecore is taking us this year. The demo of the well known Nikam fake product website was telling of how they're looking towards a more integrated toolset. Sitecore isn't selling their product as a standalone utility, but more of a tool that helps you integrate your increasingly growing end points to help you draw a more complete image of your entity. 

Right off the bat the demo shows how Sitecore is helping "Nikam" engage the generic user by tying together their browsing, email and Facebook experience quickly and seamlessly. Of course as a develop

...

Sitecore Symposium Kickoff

October 23, 2012

I'm at Sitecore Symposium in sunny Las Vegas and I'm going to be writing a series of articles covering the developer track that I'm attending. I'll be trying to live blog where I can.

So far I've met a lot of great people starting with the New England Sitecore user group that filled the plane I was on to get here. There's also a lot of great partners like Oasis, where I originally cut my teeth, and Velir. There's also a lot of great tech companies in attendance like Brightcove who is obiously near and dear to my heart.

It's Sitecore's largest most energetic showing. There's also a record number

...

Deprecated Sitecore Field Conversions

June 8, 2012

So while preparing my Sitecore system for a future upgrade to 6.5 I noticed that there were a lot of fields that were using deprecated field types. It's not a surprise since the original system was built on 5.3 but it's one of those things that's easily overlooked. It can seem daunting at first to update all the templates on a running system but the field types have more to do with how the fields are managed than whether or not the data gets removed from the database. The good news is that the deprecated fields all have an analogous field that it can be upgraded to easily. Well, except the ser

...

Adding a button to the Rich Text Editor in Sitecore 6.4

February 17, 2012

Since there were some significant changes in Sitecore's RTE when they upgraded to Telerik's new libraries from Sitecore 6.3 to 6.4. I'd written previously about adding buttons to the RTE before and was lookin for a good reason to write a supplemental article. Thankfully the new editor actually simplifies a bit of what you'll need to do from the earlier version of Sitecore.

I was recently asked by a content editor how to insert a YouTube video on a page in Sitecore and after thinking about the best approach to respond with my options were to tell the user to change to HTML mode in the Rich Text E

...

Setting Up a Sitecore Extranet

December 26, 2011

I've recently needed to setup an extranet for several websites and began researching. There are several helpful articles on the topic. I found bolaky.net and blog.wojciech.org as well as using Sitecore's Security API and Security Administrator cookbooks. Although there was enough information to get me started, what I found was disjointed and there were a few specifics that weren't detailed. After some testing I was able to create a functioning extranet and in an effort to create a more comprehensive article I have detailed my results.

1. Create Extranet Sublayouts

The first thing you'll want to

...

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: 7294ECFC0

...

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.

For those of you not familiar with web controls or server controls it's basically a custom asp.net tag in the form <customTagPrefix:customTagName>. I

...

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.

The settings for the rich text editor are stored in the Telerik Tools File. The file is located under /website/sitecore/shell/controls/Rich Text Editor/ToolFile.xml.

There are all the settings for the drop down fields stored here. I'm not going to go through them all but I'll qu

...

Sitecore Data Importer

July 8, 2011

Many of the projects I've worked on over the past several years have required importing data either from SQL or from an existing Sitecore installation itself. The original application was a page form that imported data from a database and was developed by Mark Graber, Sitecore MVP and employee at Agency Oasis. Each time I've used it I improve on it and have since retooled it as an internal Sitecore application. I've recently cleaned it up to be a reusable, customizable application and am releasing it as a shared source module. You can find it on Sitecore Shared Source, or by getting the SVN re

...

Fix Broken User Manager

June 1, 2011

I've long given up on using the User Manager paging buttons until yesterday when looking over the known issues, I found an article describing a solution to my problem on SDN. Knowing at least one other individual that has had the same issue I thought I'd do a write up to bring attention to it so that the anyone else with the same issue can get back use of their user manager.  

The problem was that on the UserManager, the paging buttons (shown below) simply didn't work.

 

With a long list of users I would often cringe at the thought of the day when I wouldn't know the name of the user I was trying

...

Partial Html Cache Clearing

May 26, 2011

*the code was updated 8/2/2011 with some insight from Mrunal Brahmbhatt. Much appreciated.

 So I recently upgraded my system to Sitecore 6.4 from Sitecore 6.2 and was pumped about a lot of the new features like multi-browser support, new Rich Text Editor but mostly, the new built-in multi-target cache management system. Now I have to say that when I heard the words "partial cache clearing" I completely misunderstood what it meant. I thought it was partial html cache clearing thinking that when a single page got published, just that item was removed from cache. The truth is that when anyone publ

...

Update to Sitecore Stager

May 3, 2011

If you're on a Sitecore environment pre-6.3 and you're using the Sitecore Stager you may have noticed that each publish will clear the entire HTML for a site. This may be fine for you but I like to have more granular control over the cache so I've updated the source code a bit to clear only entries related to the published items. I'm not going to knock the Sitecore Stager, it's an excellent utility. Plus this why they release source code in the first place.

This idea may appeal to you and if it does you should be aware of the pro's and con's of this approach. Let's first go over how cache entr

...

Multi Site Rich Text Editor Stylesheet in Sitecore 6.4

April 29, 2011
Tags: Sitecore, Wysiwyg

So while doing a dry run of an upgrade from Sitecore 6.2 to Sitecore 6.4, I noticed something that stopped working in my rich text editor: dynamic stylesheets. I have a large multi-site platform and it's using code from the dynamic stylesheets SDN Article to set a unique stylesheet in the wysiwyg editor for each site. The Telerik codebase has changed a bit and the rich text editor has also. So I'll go through what I did to get it working so you can shortcut the hassle. The first thing you'll need to know is that the file loading the rich text editor is now located at EditorPage.aspx instead of

...

Sitecore Sublayout Parameters and Datasources

April 27, 2011
Tags: Sitecore

Some of the most useful features in Sitecore are also some of the least well known. The longer you work with anything, the more you begin to understand it. With something as complex as Sitecore you really have to spend a lot of time learning what it can do before you start to really see how well it's suited to solving a lot of different problems.

Sitecore's sublayouts, for example, contain a wealth of technology that is not really documented, but it's the bedrock of an effective solution. The sublayout definitions in a presentation definition are where you determine where it appears on a page.

...

Cache Manager

March 22, 2011
Tags: C#, .NET, JQuery, Sitecore

So if you've ever setup caching on a Sitecore site you'd be familiar with the admin cache page. I recently had to set it up on a fairly large existing site and though there were a lot of other issues, one was that I was overwhelmed by the length of the list I had to view to get the information I needed. So I spent a little time and built a new admin cache page so that I could search just for what I wanted and clear out the excess noise. I built it to be a drop in place setup so that there are no external libraries or files. You can literally just copy these files into the same folder the origi

...

Using Brightcove in Sitecore

March 16, 2011

update on 9.13.2011 - Sukiyoshi's open source license has changed to the MIT open source license.

update on 3.8.2012 - Sukiyoshi has been updated to work on Sitecore 6.4 and up and has a specific release for it you can jump over to the Sukiyoshi open source repository for the specifics.

Over the past few years I've been fortunate enough to have had the opportunity to work with Brightcove and was given a development account for their platform that I could work against. In that time I went and took the existing .NET SDK Tanaris that had implemented the video read methods and blew out the rest of th

...

Rich Text Editor Profiles

March 15, 2011
Tags: Sitecore, Wysiwyg

While doing research for another article I came across an article on Stack Overflow asking about Rich Text Editor Profiles. The author noted that nothing had been written on the topic so I thought I might go ahead and fill in the blank. So to start from the top for anyone new to Sitecore, when you're creating fields on a template you select a Rich Text Editor as a field type. This will allow content editors to use the Telerik wysiwyg editor when they click to edit that field. If you use the stock Rich Text Editor field you'll notice that there are very few buttons to use and might wonder why i

...

Inspecting Sitecore Packages Before You Install Them

March 14, 2011
Tags: Sitecore

So if you've worked with Sitecore for any length of time you've probably created your own data packages to move to a remote server or installed a module from Sitecore shared source. You may have wondered what you were installing out of curiosity or fear of blowing up your installation. It's also good to know all the files created or items that you'll need to publish. One way to go about  inspecting a package is to open it first in the package designer. First open the package designer:

Then at the top if you click on the "New" text you'll see an option to open "From Existing":

You'll be give an d

...

Clean your XPath

March 1, 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:

public static class StringExtensions {
	public static string CleanXPath(this string s) {

		string sc
...

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

...

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".

This is a custom editor tab. Sitecore provides this one out of the box along with many others but occasionally you'll find it advantageous to create

...

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 hand

...

Sitecore Express

February 5, 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 b

...

Adding a button to Rich Text Editor in Sitecore

February 5, 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.

To start you'll need to create a button in the wysiwyg toolbar. You will need to switch over to the core

...