speakexample

Creating custom Sitecore SPEAK rule Conditions and Actions

After writing my previous post about Sitecore SPEAK rules magic I got really excited when I realized how extremely easy it is to add new actions and conditions to the SPEAK rules engine. So here goes. To make any real sense of this post I would suggest that you start reading from my first post about SPEAK if you haven’t read the previous posts already. ...

December 22, 2013 · 6 min · alc

Sitecore SPEAK rules magic

At this time of year everyone is speaking about Christmas magic, but today I will show you some SPEAK magic using rules. Following the example I gave in my last post where we made a text clickable and then changed the background color depending on the click, now let us make a rule which hides the control when count is equal to let say 22. Setting up the Sitecore SPEAK rule First we create a folder called Rules beneath the StartPage PageSettings item and in this folder we create a RuleDefinition item which we call HideControlRule. ...

December 22, 2013 · 6 min · alc

Part 4: Introducing Sitecore SPEAK Components

This post is the fourth and final in a series about Sitecore SPEAK components. Now we have seen how a SPEAK component is built in part 1, 2, and 3. In this post I will show a full example of a really simple custom control. Why create a Custom SPEAK component anyway? Sitecore delivers 70++ SPEAK controls and components which should cover most needs, but in some cases you might want something completely domain specific in your SPEAK application which cannot be achieved with the standard controls. ...

December 17, 2013 · 6 min · alc

Part 3: Introducing Sitecore SPEAK Components

This post is the third in a series about Sitecore SPEAK components. A SPEAK control rendering can be implemented in two ways. Simple approach, the control consists of a Razor view, a Javascript file and potentially some styling. Advanced approach, consist of the same as the simple approach with two C# classes and some extension method added. If databound properties are inherited from a base component then using the Advanced Approach can save some plumbing code. But this is also at the cost of lower flexibility and readability. ...

December 14, 2013 · 8 min · alc

Part 2: Introducing Sitecore SPEAK Components

This post is part 2 in a series showing how to create custom Sitecore SPEAK components. In this post I will show how to setup a custom SPEAK component in Sitecore. It is actually just setting up a rendering in Sitecore and then creating a rendering parameters template for it which is actually just a template item residing beneath the rendering item. Registering a SPEAK component in Sitecore To do this we do not need to enter Sitecore at all, what we need to do is to use Sitecore Rocks as mentioned in part 1. To make it even more easy then scope the Sitecore Explorer to the core database in which you want to register the control. ...

December 10, 2013 · 3 min · alc

Part 1: Introducing Sitecore SPEAK Components

This post is part 1 in a series showing how to create custom Sitecore SPEAK components. It is time for Sitecore developers to learn Javascript and become all around web developers not just hiding back in the save haven of the server. Like it or not this is the way things are going. Looking on the bright side with todays frontend technologies it is almost the same to work on the client as on the server. ...

December 3, 2013 · 6 min · alc

Issues with Design Importer 2.0, Sitecore 7.0 and ECM 2.1

The silence is broken, this is my first blog post for the last 3 weeks time since I’ve been renovating my apartment. But now I’m back first with this small information post. I was installing a clean Sitecore 7 with ECM 2.1 and design importer 2.0 for Sitecore 7 yesterday. The design importer was working fine in the content editor but when trying to create a new message in ECM I received the following exception. ...

December 3, 2013 · 1 min · alc

Switch the Context Item

Some times you’ll come across some code which relies on reading the Sitecore.Context.Item and there is no way for you to change this. This can occur when calling some standard Sitecore pipelines, some custom code which has been inherited without the source etc. Well, Sitecore API to the rescue. Introducing the ContextItemSwitcher I am not sure how long this has been a part of the Sitecore API, but at least since 6.4 where I first noticed it. ...

November 7, 2013 · 1 min · alc

Does a Sitecore item derive from a template

This is my fifth post in a series about creating Sitecore .NET extension methods on a Sitecore item. I love extension methods and have been using them to wrap common operations on Sitecore items since they were introduced in .NET 3. The series of posts will also contain an architectural description on how to implement and maintain your extension methods so these are re-usable in all of your Sitecore solution s. ...

November 7, 2013 · 3 min · alc

Sitecore Analytics: Display content by relevance using profile cards

For this post to make sense I will need to create a user story. I will not try to create a standard scenario instead I will create a scenario that is easy to understand and easily applicable to this post. The problem we want to solve is to present some content to the user that is relevant to the content that the user is looking at in any given time. ...

November 4, 2013 · 3 min · ap