Skip to main content

Posts

First and Last Publish Dates in Sitecore

Sitecore users and developers occasionally ask how to find out when an item was most recently published or when it was first published. Unfortunately, the answer isn't as simple as you might assume.

Set Cookies from a Sitecore Rule Action

Here's a quick one to correct an omission from my previous post where I detailed 3 rule conditions that respond to the presence of a cookie. On reflection I realised I should have included a corresponding action class. So here it is. As before, I haven't spent much time considering the practical applications. I'll leave that part up to you.

Cookie Based Sitecore Rule Conditions

I recently encountered a situation where I felt it would be beneficial to use cookie values to influence conditional rendering in Sitecore. I assumed there must already be some code for this on the web. But after a Googling a few different keyword combinations I couldn't find anything, and by my reckoning that absence makes it suitable blog material.

A Switching Link Provider in Sitecore

Image by  by  Diorama Sky This post demonstrates a way of allowing Sitecore to dynamically select a link provider depending on the current context. It's partly inspired by  an article written by Craig Taylor  about developing multi-site Sitecore instances, with different teams (potentially different companies) working on each site. In situations such as that, I simply don't think it's possible to proceed unless you adopt strategies like the one I outline here.

Handling Duplicate Media Paths in Sitecore.

When Sitecore receives a media request it goes through a few key steps to convert the URL in to a form it can use: Sitecore identifies that the request is for a media item because the path begins with a media prefix defined in the web.config. www.website.com /~/media /Images/kitten.jpg  The prefix is removed and replaced with the root of the media library. /media library / Images/kitten.jpg The file extension is removed. /media library/Images/kitten

Create Site Specific Pipeline Processors for Sitecore

This post outlines a method of selecting different processors in the httpRequestBegin pipeline depending on the context site.  (Edit: John West has now  expanded on this idea , with an approach that does not require a 'parent' processor)