![]() | DefaultPathsProvider Class |
Namespace: HandlebarsDotNet.Mvc
The DefaultPathsProvider type exposes the following members.
Name | Description | |
---|---|---|
![]() | DefaultPathsProvider | Initializes a new instance of the DefaultPathsProvider class |
Name | Description | |
---|---|---|
![]() | GetLayoutFolders |
Gets the folders for where the layout files can be for the given ControllerContext.
The paths returned are in the form "~/Views/_Layouts/".
|
![]() | GetPartialsFolders |
Gets the folders for where the partials files can be for the given ControllerContext.
The paths returned are in the form "~/Views/_Partials/".
|
![]() | GetViewFolders |
Gets the folders for where the view files can be for the given ControllerContext.
The paths returned are in the form "~/Views/Home/".
|
Name | Description | |
---|---|---|
![]() | AllowControllerlessViewFolder |
Whether to allow view files to be located directly in the Views folder. Default: .
|
![]() | AreasFolderName |
The name of the folder where areas are located. Default: "Areas"
|
![]() | LayoutsFolderName |
The name of the folder where layouts are located. Default: "_Layouts"
|
![]() | PartialsFolderName |
The name of the folder where partials are located. Default: "_Partials"
|
![]() | SharedViewsFolderName |
The folder name for shared view files (not specific to a certain controller). Set this to if you want to disable this functionality. Default: "_Shared"
|
![]() | ViewsFolderName |
The name of the folder where views are located. Default: "Views"
|
View Folder Path (as returned by DefaultPathsProvider) | Note | Example view file path (area: Users, controller: HomeController, action: Index) |
---|---|---|
~/Areas/{area}/Views/{controller}/ | Only if within an area. | ~/Areas/Users/Views/Home/Index.hbs |
~/Areas/{area}/Views/_Shared/ | Only if within an area. Note that "_Shared" is configurable (can also be empty, and if so this is not returned). | ~/Areas/Users/Views/_Shared/Index.hbs |
~/Areas/{area}/Views/ | Only if within an area, and only if AllowControllerlessViewFolder is . | ~/Areas/Users/Views/Index.hbs |
~/Views/{controller}/ | ~/Views/Home/Index.hbs | |
~/Views/_Shared/ | Note that "_Shared" is configurable (can also be empty, and if so this is not returned). | ~/Views/_Shared/Index.hbs |
~/Views/ | Only if AllowControllerlessViewFolder is . | ~/Views/Index.hbs |
Layout Folder Path (as returned by DefaultPathsProvider) | Note | Example layout file path (area: Users, controller: HomeController, action: Index, layout: standard) |
---|---|---|
~/Areas/{area}/Views/{controller}/_Layouts/ | Only if within an area. | ~/Areas/Users/Views/Home/_Layouts/standard.hbs |
~/Areas/{area}/Views/_Layouts/ | Only if within an area. | ~/Areas/Users/Views/_Layouts/standard.hbs |
~/Views/{controller}/_Layouts/ | ~/Views/Home/_Layouts/standard.hbs | |
~/Views/_Layouts/ | ~/Views/_Layouts/standard.hbs |
Partials Folder Path (as returned by DefaultPathsProvider) | Note | Example partials file path (area: Users, controller: HomeController, action: Index, partial: search) |
---|---|---|
~/Areas/{area}/Views/{controller}/_Partials/ | Only if within an area. | ~/Areas/Users/Views/Home/_Partials/search.hbs |
~/Areas/{area}/Views/_Partials/ | Only if within an area. | ~/Areas/Users/Views/_Partials/search.hbs |
~/Views/{controller}/_Partials/ | ~/Views/Home/_Partials/search.hbs | |
~/Views/_Partials/ | ~/Views/_Partials/search.hbs |