Extending Computed Fields in Sitecore By Adding Parameters

Computed Fields In Sitecore

The purpose of computed fields is to create pre-calculated values when working with indexes. Such approach allows to proceed with the search though distributed data or even when some data is outside the Sitecore (data from the external services could be taken into the Sitecore search engine).

There are many interesting use-cases of how to use computed indexes. I’m going to share some tips to help people get the most of them.

Continue reading “Extending Computed Fields in Sitecore By Adding Parameters”

Sitecore: 404 without 302.

Sitecore: 404 without 302.

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.

How Sitecore handle NotFoundItem

Sitecore lets you specify a page to use for ‘ItemNotFound’ errors in web.config, and it’s always good practice to have a pretty ‘page not found’ page:

<setting name="ItemNotFoundUrl" value="/404" />

When Sitecore can’t find the requested item, it will redirect the user to the page that is configured in the setting ItemNotFoundUrl.

However, during the redirecting the response returns an HTTP status code 302 (Moved Temporarily). This is sad, as search engines don’t understand that the page actually hasn’t been found.

For search engine optimization, you should return the HTTP 404 status code for any invalid URL by setting the Status property of the current System.Web.HttpResponse

Continue reading “Sitecore: 404 without 302.”

User friendly development in Sitecore

User friendly development in Sitecore

Sitecore is an ideal product to manage complex websites. Editors which don’t have a technical vision but oriented in marketing only – it’s a little bit tricky to understand the custom made things.

Here I will show a few examples of how to implement things on a user friendly manner. That is also nice for the tester and other developers to find quickly the way in the created page templates and components.

It takes some time to make a beautiful and user-friendly Sitecore CMS environment. But at the end a user friendly Sitecore implementation save time and makes it fun to work with. Be nice to the editors, the user friendly cms implementation help to use thethings as they are intended.

Continue reading “User friendly development in Sitecore”

Avoid displaying pages without a language version

The Sitecore CMS allows you to create multiple versions of the pages for each of the languages supported by your site. Still, sometimes you may want to have particular pages translated into to a certain subset of the languages, e.g. if you have French content that should be available for end users in just France and Canada. The problem is that when you try to access the page in a language which does not have a supported version, you won’t get a 404 error, but be displayed an empty page.

Continue reading “Avoid displaying pages without a language version”

Sitecore Control Panel

Sitecore control panel contains wide variety of functionality which has not been highlighted very well. In this post I will describe all the features that Sitecore Control Panel has provided.

Official documentation

Every  Sitecore developer knows about SDN (Sitecore Developer Network). There are lots of materials could be found. So, I visited SDN and searched any info for Control Panel. I have got the following article:

In this document functionality has been described very well. Unfortunately, all screens were from Siteocre 5.3. Also, a few options have been removed and some of them have been updated. So, the new screenshots are provided below. Let’s observe them!

Continue reading “Sitecore Control Panel”

How to remove Template Language Version

Few days ago I have faced with the situation when some of my templates had had language versions that differs from en.

Firstly I opened Template Manager and navigated to desired template. Then I clicked on Versions tab and was very surprised. There was no button to remove version! There is possibility to save, to switch and to reset, on this tab. Fortunately, Sitecore is a very powerful tool with a lots of different helpful utility pages. One of them saved my life.

Continue reading “How to remove Template Language Version”

Sitecore MVC – Custom Vary By Cache Options

Sitecore, by default, provides varies options like Vary by Data, Vary by Query String to enable HTML cache (more information about Sitecore caching could be found here). Sometimes none of these options (based on component built type) help the component to get cached by Sitecore cache.

In this article I will describe how to introduce custom VaryByCache option. It’s pretty simple.

First of all, let’s create a new template where all custom VaryByCache options will be presented.

Sitecore VaryByCache template

Continue reading “Sitecore MVC – Custom Vary By Cache Options”