Creating a custom pipeline in Sitecore

Pipelines are one of the most essential parts of Sitecore and creating your own custom pipeline in Sitecore makes your code extremely flexible for both you and others. It is extremely easy to create and run a custom pipeline as this post will show.

Defining the pipeline

A pipeline consist is a set of processor classes which each has a method called Process which takes one argument of PipelineArgs or a derived class.

To configure a pipeline create a new .config file in the include folder:

Create a class derived from PipelineArgsĀ which suits your implementation needs.

Create the processor class(es):

Insert them in your config.

Calling the pipeline

To call the pipeline we use the CorePipeline.Run method as follows:

This is how simple it is to create a pipeline.

Anders Laub

Anders Laub Christoffersen

Anders has been working with Sitecore for over a decade and has in this time been the lead developer and architect on several large scale enterprise solutions all around the world. Anders was appointed the title of Sitecore Technical MVP in 2014 and has been re-appointed the title every year since then.

2 thoughts on “Creating a custom pipeline in Sitecore

Leave a Reply

Your email address will not be published. Required fields are marked *