LibrarySites.Banner

All About the Sitecore ASP.NET CMS Rules Engine

This blog post contains or links to everything I could find about the Sitecore ASP.NET CMS rules engine. This will be another relatively short post, as the Rules Engine Cookbook on the Sitecore Developer Network (SDN) is relatively comprehensive.

The rules engine provides a browser-based interface for defining rules. A rule consists of conditions and actions. When the conditions evaluate to true, Sitecore invokes the actions.

Sitecore uses the rules engine for a number of different types of rules rules to invoke at different times, such as when rendering an item or after a CMS user saves or deletes an item. With Sitecore CMS 6.5 and the Customer Engagement Platform, currently a Technical Preview on the Sitecore Developer Network (SDN), potential rule contexts include:

  • Global and rendering-level conditional rendering rules
  • Content Editor warning rules, which add warnings to the content editor.
  • Insert options rules, which modify insert options. For more information about insert options, see the Data Definition Reference on the SDN.
  • Item deleted rules, which run after deletion of an item. 
  • Item saved rules, which run after item updates. For more information about item saved events, see my blog post
  • Validation rules, which run during validation. For more information about validation, see my blog post All About Validation with the Sitecore ASPN.ET CMS
  • Version removal rules, which run after version removal.
  • Page event rules, which run when processing analytics page events.

In most cases, a pipeline processor or event handler defines a processing context and invokes the rules engine. For more information about pipelines and events, see my blog posts All About Pipelines in the Sitecore AS.PNET CMS and All About Events in the Sitecore ASP.NET CMS

For an introduction to the rules engine and conditional rendering, see my blog post Sitecore Rules Engine and Conditional Rendering and the Decoupling through the Rules Engine blog post by Alistair Deneys. For an example of using item saved rules to control item names, see my blog post Use the Sitecore Rules Engine to Control Item Names.

For information about invoking the rules engine in a custom context or to determine the context device, see my blog post Using the Sitecore Rules Engine in a Custom Context Setting the Context Device. For more details about this approach, see the WURFL-based mobile device detection for Sitecore CMS and Mobile Device Detector - Performance entries on the Sitecore Snippets blog. For an example that uses the rules engine to control site navigation, see the Sitecore Rules Engine - Managing Top Level Navigation Inclusion blog entry by Eric Nordberg.

If you have any information or links to share in regard to the rules engine, please comment on this blog post.

More posts All About the Sitecore ASP.NET CMS.