Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Steps to creating your own exporter

  1. Create a new module to contain the initialization code: https://docs.xperience.io/custom-development/creating-custom-modules/initializing-modules-to-run-custom-code . For the sake of simplicity, you can create the following files directly inside the CMSApp project that references Hawksearch.Kentico.Xperience.CMS NuGet package. Realistically, you would most likely want to create your own project which will reference Hawksearch.Kentico.Xperience.CMS and then have the CMSApp project reference your newly created project.

  2. Either create your own class which implements Hawksearch.Kentico.Xperience.CMS.Services.Indexing.Contracts.IHawksearchExporter or inherit from Hawksearch.Kentico.Xperience.CMS.Services.Indexing.Exporter.

  3. Implement your custom logic.Create a new module to contain the initialization code: https://docs.xperience.io/custom-development/creating-custom-modules/initializing-modules-to-run-custom-code

  4. In the module’s OnPreInit method, register your new exporter class. Here CustomExporter is assumed to be your exporter class, so replace it with your own class name:

    Code Block
    protected override void OnPreInit()
    {
        base.OnPreInit();
    
        CMS.Core.Service.Use<IHawksearchExporter,CustomExporter>();
    }
  5. Now the system will use your custom exporter.