Class SiteDefinitionResolver
Resolves which SiteDefinition to use.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 10.10.4Syntax
[Obsolete("Use ISiteDefinitionResolver instead")]
public class SiteDefinitionResolver : ISiteDefinitionResolver
Constructors
SiteDefinitionResolver()
Declaration
public SiteDefinitionResolver()
Methods
GetByContent(ContentReference, Boolean)
Gets the SiteDefinition for a content reference.
Declaration
public virtual SiteDefinition GetByContent(ContentReference contentLink, bool fallbackToWildcardMapped)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
System.Boolean | fallbackToWildcardMapped |
Returns
Type | Description |
---|---|
SiteDefinition | A SiteDefinition instance for the site that |
Remarks
This is done by traversing the page tree upwards from current link until a Page that matches a StartPage for a registered SiteDefinition.
If the contentLink
is not located beneath a start page, the search will fall back to the SiteDefinition instance
for the site mapped with * as host fallbackToWildcard
is set to True.
GetByHostname(String, Boolean, out HostDefinition)
Gets the SiteDefinition that has a host that matches specified hostname.
Declaration
public virtual SiteDefinition GetByHostname(string hostName, bool fallbackToWildcard, out HostDefinition matchedHost)
Parameters
Type | Name | Description |
---|---|---|
System.String | hostName | |
System.Boolean | fallbackToWildcard | if set to |
HostDefinition | matchedHost | The HostDefinition on the site definition that matched the provided host name. |
Returns
Type | Description |
---|---|
SiteDefinition | The SiteDefinition that matches host or null if no matches |
GetDefinitionForContent(ContentReference, Boolean, Boolean)
Declaration
public virtual SiteDefinition GetDefinitionForContent(ContentReference contentLink, bool fallbackToWildcardMapped, bool fallbackToEmpty)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | |
System.Boolean | fallbackToWildcardMapped | |
System.Boolean | fallbackToEmpty |
Returns
Type | Description |
---|---|
SiteDefinition |