Interface ISiteDefinitionResolver
Component that resolves which SiteDefinition that matches
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public interface ISiteDefinitionResolver
Methods
GetByContent(ContentReference, Boolean)
Gets the SiteDefinition for a content reference.
Declaration
SiteDefinition GetByContent(ContentReference contentLink, bool fallbackToWildcard)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
System.Boolean | fallbackToWildcard | if set to |
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
SiteDefinition GetByHostname(string hostname, bool fallbackToWildcard, out HostDefinition matchedHost)
Parameters
Type | Name | Description |
---|---|---|
System.String | hostname | Name of the host. |
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 |