Class DefaultViewContentProvider
Provides default content for Razor view files.
Inheritance
object
Namespace: Umbraco.Cms.Core.IO
Assembly: Umbraco.Core.dll
Syntax
public class DefaultViewContentProvider : IDefaultViewContentProvider
Constructors
View SourceDefaultViewContentProvider()
Declaration
public DefaultViewContentProvider()
Methods
View SourceGetDefaultFileContent(string?, string?, string?, string?)
Gets the default file content for a Razor view.
Declaration
public string GetDefaultFileContent(string? layoutPageAlias = null, string? modelClassName = null, string? modelNamespace = null, string? modelNamespaceAlias = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | layoutPageAlias | The optional alias of the layout page to inherit from. |
| string | modelClassName | The optional class name of the model. |
| string | modelNamespace | The optional namespace of the model. |
| string | modelNamespaceAlias | The optional alias for the model namespace (defaults to "ContentModels"). |
Returns
| Type | Description |
|---|---|
| string | The default Razor view content as a string. |