Class GlobalSettingsExtensions
Inheritance
System.Object
Namespace: Umbraco.Core.Configuration
Assembly: Umbraco.Core.dll
Syntax
public static class GlobalSettingsExtensions
Methods
View SourceGetUmbracoMvcArea(IGlobalSettings)
This returns the string of the MVC Area route.
Declaration
public static string GetUmbracoMvcArea(this IGlobalSettings globalSettings)
Parameters
Type | Name | Description |
---|---|---|
IGlobalSettings | globalSettings |
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".