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.

No comments :

Post a Comment