Sitecore: extending field datasource queries with tokens

It is quite common situation when you need to create data source query for a field in a template that is quite complex: e.g you would like to use current item property as a part of a query or you have dependency on some other item in a content tree.

In case of list fields you could use GetLookupSourceItems pipelines to modify query according to your requirements.

As usual you will need to register this pipeline in sitecore patch file and put it in <web root>/app_config/include

Finally, to use it need to use defined token in a field query, when you defining your template.

Simple, but give you a lot of flexibility.

Sitecore: multisite solution organization

Reading Sitecore manuals or digging in the Internet you probably see a following statement: "Information Architecture is very important for Sitecore solution". So I would like to share some thoughts and approached.
Nowadays I'm mainly working with MVC and this post is also about it, but a lot of stuff could be applicable to WebForms as well.

Sitecore: using MVC areas

Sitecore out of the box will not provide MVC ares support but you will really need this functionality for good solution organization. However, Sitecore has good pipelines system and you could plug you code that will resolve areas.