Class GlobalSettingsExtensions
Inheritance
System.Object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Core.dll
Syntax
public static class GlobalSettingsExtensions
Methods
View SourceGetBackOfficePath(GlobalSettings, IHostingEnvironment)
Returns the absolute path for the Umbraco back office
Declaration
public static string GetBackOfficePath(this GlobalSettings globalSettings, IHostingEnvironment hostingEnvironment)
Parameters
Type | Name | Description |
---|---|---|
GlobalSettings | globalSettings | |
IHostingEnvironment | hostingEnvironment |
Returns
Type | Description |
---|---|
System.String |
GetUmbracoMvcArea(GlobalSettings, IHostingEnvironment)
This returns the string of the MVC Area route.
Declaration
public static string GetUmbracoMvcArea(this GlobalSettings globalSettings, IHostingEnvironment hostingEnvironment)
Parameters
Type | Name | Description |
---|---|---|
GlobalSettings | globalSettings | |
IHostingEnvironment | hostingEnvironment |
Returns
Type | Description |
---|---|
System.String |
Remarks
This will return the MVC area that we will route all custom routes through like surface controllers, etc... We will use the 'Path' (default ~/umbraco) to create it but since it cannot contain '/' and people may specify a path of ~/asdf/asdf/admin we will convert the '/' to '-' and use that as the path. its a bit lame but will work. We also make sure that the virtual directory (SystemDirectories.Root) is stripped off first, otherwise we'd end up with something like "MyVirtualDirectory-Umbraco" instead of just "Umbraco".