codeflood logo

Coffee => Coder => Code

Ramblings on code, Sitecore and stuff

Post item:saved Event Handler Execution

Sitecore allows classes to subscribe to particular events so arbitrary code may run when certain "things" happen. Possibly one of the most often subscribed events is the item:saved event which fires when an item is, you guessed it, saved. Whether through the UI or the API the event will always fire. This is very handy for changing or cleaning up an item once the author has signaled that...

Always select a publishing target in Sitecore

At the end of last year I accepted a new position at eDynamic as the CMS Practice Head. And as such, I'll be posting many things on our company blog Digital Dynamics. I am happy to say that my first eDynamic blog post has been published, which talks about always selecting a publishing target in Sitecore. This article talks about various options for making sure content authors always publish their...

SME Review with More Dynamic Roles

When considering content ownership in Sitecore, you realise Sitecore is a bit of a hippy. It's not so much about who owns the content, it's about everyone working together in collaboration and harmony. This is evident in the default manner in which workflow works, and how authors push the content from workflow state to workflow state without needing to explicitly state who the content goes to. The...

Common Redirect Exclusions

Recently my TDS (Team Development for Sitecore) install started acting funny. And the symptoms didn’t seem consistent between different solutions, so it looked like the issue was to do with those specific installs. When I tried to perform any operation from my TDS project with Sitecore I would receive an error about the response content type, followed by an error to do with the version of the...

Decoupling Through the Sitecore Event Pool

There are several ways to allow disparate components in a .net application to communicate. And usually it involves events. Standard .net events require a reference to the object exposing the event to connect an event handler to that event, in the following manner. var someObject = FindObject(); someObject.TheEvent += new EventHandler(MyEventHandler); How that FindObject() method is implemented...

Revolver 2, Released and Now Free

It’s been a while since the last update to Revolver so this release is long overdue. Today I have released version 2 of Revolver, the scripting module for Sitecore. The timing of this release is in preparation for Sitecore Symposium Australia where I’ll be presenting on scripting with Sitecore. Of course I’ll be covering Revolver and I will also be covering other scripting modules...

Adding Options to Sitecore Applications

Recently I was asked what I like the most about Sitecore. There are many reason’s I like Sitecore, but one stand out reason is it’s extensibility. I like how I can extend Sitecore’s UI and processes to add my own functionality or change how Sitecore works to meet my client’s requirements. So, extending the Sitecore UI. On a recent project we had a requirement to provide a utility that was context...

Redirect Options

I almost can’t remember the last time I built a website and it was the first for an organisation. The internet is old enough now that everyone already has a website, so new builds now are to replace an existing web presence. Whenever replacing an existing site we need to consider how the changes could impact on Search Engine Optimisation (SEO) and in particular, how to maintain whatever rank your...

Custom WFM Action Settings UI

The Sitecore WebForms for Marketers (WFM) module is a great module providing content authors the ability to create and edit their own simple data collection forms without having to tap a developer. It comes with a range of prebuilt “actions” which act on the data being submitted through the form. The most common actions would probably be the “save to database” action which saves the submitted form...

WeBlog 2.2 Released

I’m happy to announce the next release of WeBlog, release 2.2, is now available. This release fixed a number of bugs across various areas of the module. I also spent quite a bit of time testing the more “non-developer” interfaces to the module. A number of updates were made to the Windows Live Writer integration. These updates ensure the appropriate ancestor folders such as those created by the...

Dynamic Roles in Sitecore

So what is a dynamic role? A dynamic role is one where membership is dynamically determined instead of statically assigned. The normal Sitecore roles are statically assigned to a user. They never change. Sitecore also contain 2 dynamic roles: the Everyone role and the Creator-Owner role. Inclusion in these roles is determined dynamically. OK, the Everyone role may not be quite so dynamic, but the...

Mocking Sitecore

Whenever I talk about unit testing and Sitecore, someone inevitably will ask about the practise of mocking. Mocking involves creating a simple object to replace a dependency in your unit tests so your test code doesn’t have to invoke that dependency. The issue I’ve had with mocking is that you have to deeply understand the object you’re mocking or your mocks won’t be a reflection of the dependency...

XSLT Inheritance

I like XSLT. Although if you’ve ever visited my codeflood website and had a look at my SashimiCMS you’d have guessed that. SashimiCMS is a CMS I created many years ago, all based on XML and XSLT. In fact, I currently use that CMS to manage codeflood. XSLT is a great tool for working with XML and transforming it. So it’s always a shame when I see Sitecore projects that avoid XSLT (renderings). XSLT...

Tracking Local Search with DMS

Sitecore’s Digital Marketing Suite (DMS) comes with some handy reports out of the box for analysing searches your users are performing on your Sitecore site. There’s both a high level report in the executive dashboard for site wide searches and also item reports for checking search terms leading to an item and searches performed on an item. All these reports assist in helping you work out what...

Filtering ECM Dispatcher

The Email Campaign Manager (ECM) for Sitecore is a great tool for sending bulk email and newsletters to your users and subscribers. I had an interesting question from a client recently about the Email Campaign Manager. “How can I send an email to a subset of the subscribers?” I’ll give you a scenario to describe the request. Let’s say I have a user base of national partners, but I only want to...

WeBlog 2.1 Released

Today I have made several updates to the WeBlog module for Sitecore and published release 2.1. Go grab it now from http://trac.sitecore.net/WeBlog. Here’s a few significant changes to the module. Akismet Does your WeBlog blog get swamped with spam? Are you wasting lots of manual effort on weeding it out? Then you’ll love this new feature. WeBlog 2.1 introduces Akismet support. Akismet is a...

Automated Testing in Sitecore Without an HttpContext

This year was the first year that Sitecore’s Dreamcore conference was held in Australia. And I for one jumped at the opportunity to speak at it. One topic that quite interests me is unit testing, and if you’ve read my posts over the years you’d see I have come up with a variety of techniques for getting unit testing (or rather, integration testing) working for Sitecore projects. So what better...

Presenting to the Sitecore Users Virtual Group

This Thursday (well, it will be Thursday for me, Wednesday if you’re on the other side of the date line) I’ll be presenting to the Sitecore Users Virtual Group on testing strategies for Sitecore. This is the same talk I gave at Dreamcore this year, so if you missed out, here’s another opportunity to see me talk about some testing techniques. Details can be found here:...

WeBlog Summit 2011

Ealier this year in April, Sitecore’s Dreamcore US event was held in Boston. One of my WeBlog colleagues, Nick Wesselman, gave a presentation at the event on the shared source WeBlog module. There was quite a lot of buzz around the module, especially from Sitecore themselves, who saw what we were doing with the module as a great example of Sitecore community.

Dreamcore AU 2011

It was my great pleasure to present at Sitecore’s Dreamcore event in Sydney, Australia this week. This was the first time the conference was held in Australia and it was fantastic with lots of great speakers and interesting people. My session was titled “Testing Strategies for Sitecore” and was run in the developer stream, so it focused on automated/unit testing. As promised for everyone who...