Thursday, December 23, 2010

Persona Changer update - testing any personalization rules in a few clicks!

Some time ago, we've got amazing Shared Source module called “Persona Changer” from Steve Green. Testing personalized websites became much easier in a very user-friendly way.

Monday, October 11, 2010

Live visitor tracking with Sitecore OMS and Bing Maps

Real-time information delivery is the one of the most important elements of our online experience. When information being available at the moment it's produced, you can act really quickly and efficiently. That is why the words "live", "instant", "real-time" are so popular in modern web applications.
There are lot of fun apps that show people's tweets, photo galleries on the map, but how about getting similar(and useful) app for your own website?
If it's build on Sitecore, it's incredibly easy. You just need to create a UI and a service that will retrieve your data.

In this post I'll show how to create application that will show Web Forms submissions on your website using Bing Maps.

Sunday, September 19, 2010

Count users online with Sitecore OMS

users
When you have a web application, you might want to know how many users are currently online. If you have visited some of web online forums you can see (usually on the first page) the number of currently online users.
This information might be also used to postpone some website jobs if there are too many users online, etc.
How do we know / count how many sessions or users are currently connected to our website in Sitecore?


Sunday, September 5, 2010

Windows Live Writer Integration for Sitecore

Windows Live Writer is a great tool for blogging. It is simple, fast, and can be customized using plugins written in .NET. You can have web-based interface for adding your blog or articles, but integration with desktop client will not be superfluous as it provides a lot of benefits.
 In this post I'll show how to integrate it with Sitecore CMS using MetaWeblog API -  an application interface  that enables weblog entries to be written, edited, and deleted using web services.

Integration can be divided into two parts:
  1. Implementing MetaWeblog API service members 
  2. Creating and configuring various handlers that will tell Live Writer how to find and use our service

Saturday, August 28, 2010

Using Coveo with Sitecore. Part 2: Performing a Query


This post is a part of the "Using Coveo with Sitecore" series.












There are many ways to retrieve data from Coveo, I'll describe most popular of them, their proc and cons.

Integrating search interface "as is"
Such integration of Coveo can be implemented in a day or even less, including configuring Sitecore Connector which will crawl only changed / newly created items, adding and configuring front-end search.

In order to add search interface to your website you need to:

Sunday, August 22, 2010

Using Coveo with Sitecore. Part 1: Indexing Sitecore items

Coveo Search Platform provides a Sitecore package with a module called "Sitecore Connector", which allows you to crawl not just pages, but also content items without presentation, media library, etc. While Connector configuration is described rather well in this document, there are lot of major points that are not enough clear to the programmer who starts using it.
There are lot of things to do with Coveo, so I'll break the whole story into the different blog posts:
  • Indexing Sitecore items - this post
  • Performing a query (Coveo controls and custom Query Wrappers)
  • Tips and Tricks (snippets, hidden features and real-world examples)

Let's begin from creating a Sitecore template that will contain different field types:



Sunday, August 15, 2010

Expanding / collapsing Sitecore content tree nodes on double click

The Sitecore CMS provides very high level of usability, so people without special training can get used to it very quickly. But there is one thing in content tree, that behaves differently in a Windows Explorer. Let's see the following example:










If you double-click on the "Inner folder 1" folder name, it will expand / collapse. But how about Sitecore?










Hmm... double click does nothing, item simply gets refreshed.

Saturday, August 7, 2010

Translating Sitecore items using Google Translate

One of the strongest techniques which can be used to increase sales and get more potential customers of the people from other regions is a multilingual website. Multi-language management is a cornerstone of Sitecore CMS, integrated into all aspects of content and site management. It allows you to build a multi-language website with almost the same effort as a single-language. See this amazing case-study about building website in 28 languages.

But what if you want to translate an existing site with a thousands of pages, hundreds of templates and website sections? How to identify possible architecture(like "Shared" fields that actually should be translated) problems, or implementation bugs (hard-coded texts, displaying item name instead of a title and so on). Sure, you can ask content-editors to spend few weeks in order to translate the site, test it, etc. But how about instant website translation using some online service? Translation quality is not as important when you simply need to identify possible problems after translation, so... let's start!

In this example, I'll use Google Translate as a translation provider. I also tried Bing Translator service, it's almost identical, but does not provide easy API like google-api-for-dotnet.

Sunday, August 1, 2010

Using Sitecore media cache with custom handlers.

Every certified Sitecore developer knows how media files caching works. When you request image from the media library, you can specify custom parameters like image height, width, scaling, etc. For each parameters set Sitecore stores generated image in the "/App_Data/MediaCache/" folder.

For example, you have a following image in you media library:

/~/media/images/f1
















Saturday, July 10, 2010

"Set Relative DataSource" action makes total personalization effortless.

Some people say that true personalization is too complex and expensive to set up and maintain, but with Sitecore it's incredibly easy to setup personalization rules, configure rule-based content, etc. In general, to make some personalized content, you should perform the following actions:
  1. Create a personalization rule (add conditions and actions, let's say "Set DataSource" action to point personalized content folder). 
  2. Apply it to the rendering or sublayout.
While second step cannot be avoided (unless you use global rules), the first one sometimes looks redundant, as the conditions  of the most rules are very similar, especially in location-based ones. The only difference is a DataSource. The main goal of creating "SetRelativeDataSource" action is breaking such dependency and making "clicks only" personalization setup possible.

The idea is following: let the rule control only "personalized" part of the DataSource, taking the "base"  DataSource part from the control.

Let's say, you have a lot of sub-trees with personalized content for different controls:

 

Monday, July 5, 2010

Integrating SyntaxHighlighter with Sitecore's Rich Text Editor

Some time ago I've noticed that Rich Text Editor is missing "Format Code" button in it's profiles. After initial investigation, I've found that such functionality actually exists, but it's hidden for some reason. To enable it, you should  add a new button to the profile (for example, here: /sitecore/system/Settings/Html Editor Profiles/Rich Text Full/Toolbar 1) and set it's "Click" field value to "FormatCodeBlock":


If you did everything correctly, you'll get the following button in your Text Editor toolbar:



and default RadEditor's code formatting dialog


The dialog itself looks good but html it's producing is too ugly to be used at modern websites, few lines of code result in 50+ lines of markup like:

div style="BORDER-BOTTOM: #7f9db9 1px solid; BORDER-LEFT: #7f9db9 1px solid; LINE-HEIGHT: 100% !important; BACKGROUND-COLOR: white; WIDTH: 100%; FONT-FAMILY: Courier New; HEIGHT: 132px; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-TOP: #7f9db9 1px solid; BORDER-RIGHT: #7f9db9 1px solid">


So, I've decided to replace it by very popular Syntax Highlighter  module. It has a lot of features, very customizable and looks really nice 

keeping the initial markup clear.

Thursday, January 28, 2010

Tag Cloud from Sitecore content

Let's assume you have a Sitecore site containing "Products" section, it is well-structured by categories, and contains many thousands of items.



Some day you decide to add tags to all your products...

No problem, you should just find a place to store tags



And then add a new field to the product template



Here what you got on each product:


Now the most interesting part, we need to build a tag cloud based on these values. There are lot of ways to implement it, but when you have to deal with really big content tree, the most suitable solution is using some search engine. In this example I'll use Coveo, but it's possible to implement the same functionality using Lucene with almost the same effort.