Class SeoUriRouter
Routes a SEO url
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Commerce.Routing
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0Syntax
public class SeoUriRouter : ISimpleAddressRouteHandler
Constructors
SeoUriRouter(PartialRouteHandler, IContentLoader, LanguageSelectorFactory, ReferenceConverter, IContentVersionRepository)
Initializes a new instance of the Seo
Declaration
[Obsolete("Use the constructor without LanguageSelectorFactory instead. Will remain at least until November 2016.")]
public SeoUriRouter(PartialRouteHandler partialRouteHandler, IContentLoader contentLoader, LanguageSelectorFactory languageSelectorFactory, ReferenceConverter referenceConverter, IContentVersionRepository contentVersionRepository)
Parameters
Type | Name | Description |
---|---|---|
EPi |
partialRouteHandler | The partial route handler |
EPi |
contentLoader | The content loader |
EPi |
languageSelectorFactory | The language selector factory |
Reference |
referenceConverter | The reference converter. |
EPi |
contentVersionRepository | The content version repository |
SeoUriRouter(PartialRouteHandler, IContentLoader, ReferenceConverter, IContentVersionRepository)
Initializes a new instance of the Seo
Declaration
[Obsolete("Use the constructor with ICatalogSystem instead. Will remain at least until January 2017.")]
public SeoUriRouter(PartialRouteHandler partialRouteHandler, IContentLoader contentLoader, ReferenceConverter referenceConverter, IContentVersionRepository contentVersionRepository)
Parameters
Type | Name | Description |
---|---|---|
EPi |
partialRouteHandler | The partial route handler |
EPi |
contentLoader | The content loader |
Reference |
referenceConverter | The reference converter. |
EPi |
contentVersionRepository | The content version repository |
SeoUriRouter(PartialRouteHandler, IContentLoader, ReferenceConverter, IContentVersionRepository, ICatalogSystem)
Declaration
public SeoUriRouter(PartialRouteHandler partialRouteHandler, IContentLoader contentLoader, ReferenceConverter referenceConverter, IContentVersionRepository contentVersionRepository, ICatalogSystem catalogSystem)
Parameters
Type | Name | Description |
---|---|---|
EPi |
partialRouteHandler | |
EPi |
contentLoader | |
Reference |
referenceConverter | |
EPi |
contentVersionRepository | |
ICatalog |
catalogSystem |
Fields
SeoUriRouteActiveKey
Declaration
public const string SeoUriRouteActiveKey = "seourirouteactive"
Field Value
Type | Description |
---|---|
System. |
Properties
CatalogSystem
The catalog system
Declaration
protected virtual ICatalogSystem CatalogSystem { get; set; }
Property Value
Type | Description |
---|---|
ICatalog |
Methods
GetCatalogContentLink(CatalogEntryDto)
Gets the content link from a catalog entry dto
Declaration
protected virtual ContentReference GetCatalogContentLink(CatalogEntryDto entry)
Parameters
Type | Name | Description |
---|---|---|
Catalog |
entry | The catalog entry dto |
Returns
Type | Description |
---|---|
EPi |
GetCatalogContentLink(CatalogNodeDto)
Gets the content link from a catalog node dto
Declaration
protected virtual ContentReference GetCatalogContentLink(CatalogNodeDto node)
Parameters
Type | Name | Description |
---|---|---|
Catalog |
node | The catalog node dto |
Returns
Type | Description |
---|---|
EPi |
GetLanguage(CatalogEntryDto, String)
Gets the language from the catalog entry dto
Declaration
protected virtual string GetLanguage(CatalogEntryDto entry, string seoUri)
Parameters
Type | Name | Description |
---|---|---|
Catalog |
entry | The catalog entry dto |
System. |
seoUri | The seo uri |
Returns
Type | Description |
---|---|
System. |
GetLanguage(CatalogNodeDto, String)
Gets the language from the catalog node dto
Declaration
protected virtual string GetLanguage(CatalogNodeDto node, string seoUri)
Parameters
Type | Name | Description |
---|---|---|
Catalog |
node | The catalog node dto |
System. |
seoUri | The seo uri |
Returns
Type | Description |
---|---|
System. |
GetRouteStartingPoint(ContentReference)
Gets the starting point for the route.
Declaration
protected virtual ContentReference GetRouteStartingPoint(ContentReference catalogContentLink)
Parameters
Type | Name | Description |
---|---|---|
EPi |
catalogContentLink | The content link |
Returns
Type | Description |
---|---|
EPi |
The content link of the starting point, if fund. Otherwise null. |
GetRouteValues(String, ContentReference, SegmentContext)
Tries to handle a segment value as a simple address.
Declaration
public virtual SimpleAddressRouteValues GetRouteValues(string urlSegment, ContentReference routeRoot, SegmentContext segmentContext)
Parameters
Type | Name | Description |
---|---|---|
System. |
urlSegment | The simple address |
EPi |
routeRoot | The route root |
EPi |
segmentContext | The segment context |
Returns
Type | Description |
---|---|
EPi |
|
SupportedPartialRouters(ContentReference)
Gets supported commerce routers for content
Declaration
public virtual IEnumerable<ICommerceRouter> SupportedPartialRouters(ContentReference catalogContentLink)
Parameters
Type | Name | Description |
---|---|---|
EPi |
catalogContentLink | The content link to get the supported partial routers for. |
Returns
Type | Description |
---|---|
System. |
Collection of supported commerce partial routers |