Tips

Sitecore DMS visits from specific IP addresses

Sitecore DMS stores IP addresses as a varbinary(16) in the Visits table in the analytics database. This is just perfect but it is impossible to read the IP addresses as a normal human being. To help out with this I found the following SQL function which can convert an IPv4 address to a binary.

[…]

Filter out IP addresses in Sitecore DMS

Today I was asked by a customer to filter out their internal IPs from all DMS reports. There are two approaches for obtaining this. Either very simply add the IP addresses to the Sitecore.Analytics.ExcludeRobots.config as excludedIPAddresses. But I did not like this approach. The customer editors are not robots, so this is messing up domain entities.. […]

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 […]

Sitecore 7, Lucene 3.0 and Highlighted results

For all you that will use Lucene 3.0 under Sitecore 7 and want to highlight your results using Luce.Net.Contrib libraries, let me save you a whole lot of time. On Lucene.net page http://lucenenet.apache.org/ you will find a reference to the above mentioned package which i used for retrieving highlighted results from my Lucene index. All nice and […]

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 […]

Ensuring roles in Sitecore

Roles are easy to create in Sitecore but sometimes you might want to ensure that some specific roles always exists. Not a very common scenario but nonetheless it happens. Once upon a time we needed to be able to ensure that a long list of specific roles always existed on the production instance otherwise some […]