codeflood logo

Posts tagged in Sitecore

Roll your own Sitecore Item

One of the most difficult aspects of unit testing against Sitecore is mocking Sitecore items. The Sitecore Item class is quite a complex class and it's interface is not structured the way most mocking frameworks require. Mocking frameworks allow you to create dummy objects for use inside tests. But that's not the only way to create dummy objects. One can always instantiate a class if the classes interface allows it. You might be surprised to learn that you can in fact create an instance of a Sitecore Item in your own code.

Revolver 3.0 Released and Open Source

Well, it took 3 years and help from 2 other contributors, but Revolver is finally open source! You'll find the module source on github at https://github.com/codeflood/revolver. Revolver has been release under the MIT license. Revolver 3 supports Sitecore versions 6.4 through to 8.1 and you'll find the release packages either on github...

WeBlog 2.4 Released

After a hell of a lot of effort I'm very proud to announce the release of WeBlog 2.4. The biggest feature of this release is full support for Content Search and support for Sitecore 8.0. You'll find a full list of issues fixed on the release page above. This release also marks the end of support for any version of Sitecore prior to 7.0. The codebase still contains all the old code and build...

Testable Code

Ahhh, automated testing. It's what gives you that warm fuzzy feeling that your code is all working as you intended. A validation that you're free from errors and a safety net for future modifications. OK, perhaps not necessarily free from errors, but you at least know the cases you've got covered are correct, and they're easy to run at any time to validate those cases are still working as...

Reusable JavaScript in SPEAK

In my previous post I showed how to extend existing SPEAK models and views when creating new SPEAK components so we can reuse what we've already got rather than duplicating wads of code. Reuse at the view and model level is good but it's only one part of the puzzle. What about reusing individual functions? To reuse arbitrary code in C# we can wrap that code up in a class which can be called by other code files by way of a using statement (and appropriate references in the project). But JavaScript doesn't really have a native way to allow including existing functions from another location in the current file. It's normally up to the host environment how to get other files loaded in before the current file.

Reusable SPEAK components

With the recent(ish) release of Sitecore 7.2 the greater Sitecore development community is finally getting their hands all over the shiny new SPEAK UI framework. SPEAK is a successor to Sheer UI and is intended to be used by all developers wanting to add functionality to a Sitecore instance. I've written this post against SPEAK 1.1 which is included in Sitecore 7.2. One of the strong design...

Revolver 2.2.2 Released

Two (and a half) weeks and two releases! This minor update for Revolver includes fixes to support shared session state. Shared session state occurs when an ASP.NET application is configured to store session state outside the memory of the ASP.NET application itself, or in other words, when InProc session mode is not used. With shared session state the objects stored in session need to be...

Revolver 2.2.1 Released

Revolver 2.2.1 has just been released and is now available over at codeflood. This is a rather small release to address 2 specific issues. You will find the downloads for the Sitecore package on the Revolver Download Page. The first issue addressed was a security concern in the Javascript of the Revolver client. Thanks goes to Marcin Okon of bwin.party who raised the concern and helped verify the...

Unique Item Name per Bucket

Last year I wrote a post on customising the URLs used to access items within an Item Bucket when using Sitecore 7+. The basic idea was that the structure of the bucket was completely ignored. So a URL for an item within a bucket would include the path to the bucket, then the item name. There was one important aspect of this approach that I deliberately ignored at the time of writing to keep the...

Revolver 2.2 Released

Merry Christmas Sitecore devs! And what better way to say Merry Christmas than by releasing a new version of Revolver for the Sitecore community. That's right, Revolver 2.2 is now available for download from the Revolver Download Page . Revolver 2.2 brings a variety of new commands for your scripting pleasure.

HTML Cache Lifetime

Any high performance Sitecore website will make good use of caching. After all, pulling already computed values from memory is much quicker than recomputing not to mention the required network trip to the DB to get the data to compute with. When it comes to individual presentation component caching, there are several options to allow varying the cached output on a number of aspects. For example,...

WeBlog 2.3 Released

WeBlog 2.3 has been released! You can grab the Sitecore packages from the WeBlog page on the Marketplace or grab the source from github.

Setting incompatible properties from parameters

Sitecore enables us to create reusable presentation components by allowing us to pass parameters to our component when it's used. Rather than hard coding everything required by the components, or reading it from some predefined location in the content tree, we can instead set the parameters of the component when it's placed on the page either through the presentation dialog or in the page...

Item Buckets and URLs

Update: Please also read http://blog.horizontalintegration.com/2013/07/30/sitecore-contentsearch-fails-for-lucene-reserved-keywords-like-andor/ to solve issues if you have common stopwords in your item names such as "and" and "or". So it seems everyone is having fun with Item Buckets in Sitecore 7. No seriously, go take a look at the social channels. Item Buckets open a realm...

Revolver 2.1 Released

Today I'm happy to announce the release of Revolver 2.1. You can head on over to the codeflood website to get the Sitecore package files right now. These will also be available on the Sitecore Marketplace very soon. This isn't a huge release, but does have some important new features. Let's take a look at each of these.

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

Page: 1 2 3 4 5 6 7