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 has been nominated a Sitecore Technical MVP three years in a row for 2014, 2015 and 2016. Anders is now working as a Sr. Solutions Architect at Sitecore in Copenhagen.

One thought on “Creating a custom pipeline in Sitecore

Leave a Reply

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

*
*
Website