Implement an Insert Options pipeline processor

Abstract

How to implement an Insert Options pipeline processor.

To implement an insert options pipeline processor:

  1. Create a class that implements the Process() method accepting an argument of type Sitecore.Pipelines.GetMasters.GetMastersArgs. You can use the following code sample:

    namespace Namespace.Pipelines.GetMasters
    {
      public class ClassName
      {
       public void Process(Sitecore.Pipelines.GetMasters.GetMastersArgs args)              
       { 
        //TODO: manipulate args.Masters
       }
      }
     }
  2. Add the processor at the relevant point in the Insert Options pipeline definition element at /configuration/sitecore/pipelines/uiGetMasters in web.config.

    Important

    The location of each pipeline processor in the Insert Options pipeline affects its function. For example, the results of a processor configured before the default Sitecore.Pipelines.GetMasters.GetInsertRules processor are subject to insert rules, while the results of a processor configured after the Sitecore.Pipelines.GetMasters.GetInsertRules processor are not. To remove insert options that the context user does not have access rights to use, the default CheckSecurity processor is always the last processor in the pipeline.