HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback

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.

  1. Declare a replacement component. It is important to use the definition name of the component that you want to replace.

  2. 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.