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 […]
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 […]
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 […]
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 […]
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 […]
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 […]
Handling 404 in a Sitecore multisite solution and avoid 302 redirects
This post shows how to handle a request for a page which is not found, how to avoid having the request being redirected with a 302 status code before a 404 and finally how to use different pages within Sitecore for not found pages in a multisite solution. The post is based on some code […]
SignalR component for SPEAK in Sitecore 7.1
Following my blog post from earlier this week where I showed how to make SignalR work in Sitecore SPEAK, I thought of another solution to the same issue which is much more streamlined with SPEAK. The issue which I hacked my way through was that the RequireJS implementation in SPEAK requires that a JavaScript file […]
Custom Field indexing with the new Sitecore 7 content search API
Sitecore 7 comes with it’s new Content Search API. The title of this post is self explanatory for what i’m about to share. Scenario I assume I have a website that contains information about different publishers books. These books are imported into Sitecore in XML format. I assume that on the website a user should be […]
Setting up a Sitecore SPEAK ListControl
The ListControl in SPEAK is made as a generic control for showing lists. Data is fed into the list using a datasource component as shown in my previous post here. In this post I will show how to define the columns in a ListControl and setup the rendering on a SPEAK page. It is kind […]
Creating a simple Sitecore SPEAK JSON datasource
In SPEAK a list is fed with data through a data source. For example to get data into a ListControl the Items rendering parameter on the ListControl has to be bound to a collection on a datasource. When the items model attribute changes, that is when the datasource changes, then the ListControl automatically refreshes and […]
Using SignalR in a Sitecore 7.1 SPEAK application
During the Sitecore Hackathon we decided to implement a chat app for Sitecore editors so it is possible to send text messages to other online editors. To do this we wanted to use SignalR and SPEAK for the UI part. Setting up SignalR and creating the SPEAK layout was done quickly but it quickly became […]