Class SiteDefinitionResolverExtensions
Extends ISite
Inheritance
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public static class SiteDefinitionResolverExtensions : Object
Methods
GetByContent(ISiteDefinitionResolver, ContentReference, Boolean, Boolean)
Gets the Site
Declaration
public static SiteDefinition GetByContent(this ISiteDefinitionResolver siteDefinitionResolver, ContentReference contentLink, bool fallbackToWildcard, bool fallbackToEmpty)
Parameters
Type | Name | Description |
---|---|---|
ISite |
siteDefinitionResolver | The site definition resolver that is being extended |
Content |
contentLink | The content link. |
System. |
fallbackToWildcard | if set to |
System. |
fallbackToEmpty | if set to |
Returns
Type | Description |
---|---|
Site |
A Site |
Remarks
This is done by
traversing the page tree upwards from current link until a Page that matches a StartPage for a registered Site
If the contentLink
is not located beneath a start page, the search will fall back to the SitefallbackToWildcard
is set to True. If the contentLink
is not located beneath a start page,
and if not fallen back to wildcard and fallbackToEmpty
is set to true then the system default setting will be returned which
has for example RootPage set but not site specific settings like StartPage and SiteUrl.
GetByHostname(ISiteDefinitionResolver, String, Boolean)
Gets the Site
Declaration
public static SiteDefinition GetByHostname(this ISiteDefinitionResolver siteDefinitionResolver, string hostname, bool fallbackToWildcard)
Parameters
Type | Name | Description |
---|---|---|
ISite |
siteDefinitionResolver | The site definition resolver that is being extended |
System. |
hostname | Name of the host. |
System. |
fallbackToWildcard | if set to |
Returns
Type | Description |
---|---|
Site |