The following example shows how to replace a component for the entire system. This example also shows how to replace the built-in Optimizely Content Management System (CMS) page tree with a custom page list component.
Declare a replacement component. It is important to use the definition name of the component that you want to replace.
Register the new component using the IOC container by implementing the `
ConfigureContainer` method of `
EPiServer.ServiceLocation.IConfigurableModule` in an initialization module.
This replaces any creation of the `
PageTreeComponent` with a new instance of the `
MyCustomPageList` type that is created by the IOC container.
An editor has to make a change in edit view to able to see new component.