Insert Sitecore related content directly into the RTE

What I want to achieve with this post is give the editors the possibility of inserting related content from other pages into their current Rich Text Editor. They could insert related content from some selected fields in another pages or render some spots so that they would present a page somewhat like this : I am still working on mastering the art of explaining in text so I will try to make it as short and concise as possible. Green text comes from a ”Page 1” and gray text is related content inserted from ”Page 2” . So on “Page 1” we will not have to have a RTE field, then a related content selector and another RTE field. There will be just one RTE field. ...

October 7, 2014 · 3 min · ap
updateinstallationwizard

A quick tip on upgrading Sitecore fast and easy

Today my colleague @alinulms and I had the “fun” task of updating an old Sitecore 6.5 to version 7.2. Actually we really want to upgrade the solution to Sitecore 7.5 but we are still waiting for Sitecore. I really hope 7.5 will be officially released any time real soon. I’ve upgraded Sitecore installations at least a trillion times before (or so it feels) and depending on the version, build environment etc. I’ve used a number of different approaches. The approach we used today was extremely effective so I thought that it deserves a blog post. ...

September 30, 2014 · 6 min · alc
removing_exif_koala

An involuntary lossless image compression by Sitecore

This is a small bonus post following my post series about responsive images in Sitecore. When you load a JPEG image in .NET into a Bitmap and then draw it on another Bitmap then you will notice that the original image is sometimes bigger than the new one. How can that be.. This is because .NET does not “draw” the Exif information from the JPEG image onto the new Bitmap. ...

September 11, 2014 · 3 min · alc
Koala_cropped_1

Make Sitecore deliver images which fits the screen, part 2

This is the second part of a mini-series where I show how you can make Sitecore deliver images that fully support a responsive web design. See the first post here if you haven’t read it already. In this part I will show how to make Sitecore center-crop images through the media handler using query string parameters. The concept is basically that you call the media handler with specific querystring parameters that will make Sitecore center-crop the image. Similar to the out-of-the-box Sitecore image parameters. ...

September 8, 2014 · 7 min · alc
JPEG quality compression Sitecore

Make Sitecore deliver images which fits the screen

When implementing a responsive design the size of images is almost always an issue. You want the images to be resized server-side so they fit the screen. Primarily for performance but also to please Google Page Speed. Sitecore enables us to set the width and height dynamically by sending query parameters to the media handler. My colleague Brian wrote this nice post where he explains the basic out-of-the-box Sitecore image parameters. ...

September 4, 2014 · 3 min · alc
Gzip svg sitecore

How to compress SVG images from the Sitecore media library

This blog post is long overdue. The code was written some time last year when I started my still on-going fight with Google Page Speed. When Sitecore deliver svg files from the media library there is no out-of-the-box approach for gzipping the media content and setting the Content-encoding response header to gzip. Gzipping the svg media content First we need to gzip the media content. To do this we insert the following processor into the end of the getMediaStream pipeline. ...

September 1, 2014 · 3 min · alc
markdown_preview

How to use a subset of markdown in Sitecore text fields

This is my first blog post for some months now so I’ll start somewhat easy. I attended a design presentation meeting this Friday where the customer presented a nice and simple design based on bootstrap for their new website. All was great about the design but then I noticed something funny about the spot headlines used in the design. The headlines looked somewhat like this: This is what a headline could look like Notice how the headline uses a slim text whilst some of the words are bold, also notice the irregular line-break. ...

August 17, 2014 · 5 min · alc
EngagementPlan

Sitecore Analytics rules with custom user properties

This post will show how to create an Engagement plan rule that uses custom fields. The idea is that the users have custom fields on their profile related to newsletter distribution groups. The goal is to create an engagement plan where we have a rule condition saying something like this : The engagement plan using this condition has a user in the initial state, a condition validator and a second state where the user will be put if the condition validates. An email will be sent after the validation (in this case). ...

June 13, 2014 · 3 min · ap
queuedistinct

How to stop Sitecore ECM from spamming duplicate recipients

In the current version of ECM the same mail message will be sent several times to the same user if the user has registered several times to the same target audience with a different user but the same email. The issue is really that the email recipients are not filtered by distinct emails before the newsletter is dispatched. Personally I would have thought that ECM ensured that emails was distinct before it dispatches the mail but this is not the case ...

March 7, 2014 · 3 min · alc
caches

Modifying cache keys in Sitecore

Sitecore ships with some very effective cache mechanisms. One of these mechanisms is the html cache where the output of a rendered control is cached in a table which has a key for each entry. The generated key can vary by different parameters which can be set on the sublayout, xslt, view rendering etc. The vary by possibilities are inherited from the system base template called caching. ...

February 25, 2014 · 4 min · alc