Search Results for

    Show / Hide Table of Contents
    View Source

    Class GlobalSettingsExtensions

    Inheritance
    System.Object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Core.dll
    Syntax
    public static class GlobalSettingsExtensions

    Methods

    View Source

    GetBackOfficePath(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
    View Source

    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".

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • GetBackOfficePath(GlobalSettings, IHostingEnvironment)
      • GetUmbracoMvcArea(GlobalSettings, IHostingEnvironment)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX