Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
This document provides an introduction to the initialization system in the EPiServer platform. The initialization feature is used both by EPiServer CMS and EPiServer Commerce, as well as third-party and customized modules used with EPiServer products. You can develop your own initialization module.
The initialization system consists of the following:
Refer to the Initialization system section of the EPiServer Framework SDK for more detailed information.
Here is a sample initialization module which takes a dependency to the EPiServer.Commerce.Initialization.InitializationModule and registers catalog content routes.
using System.Web.Routing;
using EPiServer.Framework;
using EPiServer.Commerce.Routing;
using EPiServer.Framework.Initialization;
namespace CodeSamples.EPiServer.Commerce.Catalog
{
[ModuleDependency(typeof(global::EPiServer.Commerce.Initialization.InitializationModule))]
public class RegisterRoutingModuleSample : IInitializableModule
{
public void Initialize(InitializationEngine context)
{
MapRoutes(RouteTable.Routes);
}
private static void MapRoutes(RouteCollection routes)
{
CatalogRouteHelper.MapDefaultHierarchialRouter(routes, true);
}
public void Uninitialize(InitializationEngine context) { /*uninitialize*/}
public void Preload(string[] parameters) { }
}
}
Last updated: Oct 21, 2014