Search Results for

    Show / Hide Table of Contents
    View Source

    Class UmbracoViewPage<TModel>

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.Razor.RazorPageBase
    Microsoft.AspNetCore.Mvc.Razor.RazorPage
    Microsoft.AspNetCore.Mvc.Razor.RazorPage<TModel>
    Namespace: Umbraco.Cms.Web.Common.Views
    Assembly: Umbraco.Web.Common.dll
    Syntax
    public abstract class UmbracoViewPage<TModel> : RazorPage<TModel>, IRazorPage
    Type Parameters
    Name Description
    TModel

    Properties

    View Source

    Umbraco

    Gets the Umbraco helper.

    Declaration
    public UmbracoHelper Umbraco { get; }
    Property Value
    Type Description
    UmbracoHelper
    View Source

    UmbracoContext

    Gets the IUmbracoContext

    Declaration
    protected IUmbracoContext UmbracoContext { get; }
    Property Value
    Type Description
    IUmbracoContext
    View Source

    ViewContext

    Declaration
    public override ViewContext ViewContext { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Mvc.Rendering.ViewContext

    Methods

    View Source

    BindViewData(ContentModelBinder, ViewDataDictionary)

    Dynamically binds the incoming Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary to the required Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary`1

    Declaration
    protected ViewDataDictionary BindViewData(ContentModelBinder contentModelBinder, ViewDataDictionary viewData)
    Parameters
    Type Name Description
    ContentModelBinder contentModelBinder
    Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary
    Remarks

    This is used in order to provide the ability for an Umbraco view to either have a model of type IContentModel or IPublishedContent. This will use the ContentModelBinder to bind the models to the correct output type.

    View Source

    RenderSection(String, HtmlString)

    Renders a section with default content if the section isn't defined

    Declaration
    public HtmlString RenderSection(string name, HtmlString defaultContents)
    Parameters
    Type Name Description
    System.String name
    Microsoft.AspNetCore.Html.HtmlString defaultContents
    Returns
    Type Description
    Microsoft.AspNetCore.Html.HtmlString
    View Source

    RenderSection(String, String)

    Renders a section with default content if the section isn't defined

    Declaration
    public HtmlString RenderSection(string name, string defaultContents)
    Parameters
    Type Name Description
    System.String name
    System.String defaultContents
    Returns
    Type Description
    Microsoft.AspNetCore.Html.HtmlString
    View Source

    Write(Object)

    Declaration
    public override void Write(object value)
    Parameters
    Type Name Description
    System.Object value
    View Source

    WriteUmbracoContent(TagHelperOutput)

    Declaration
    public void WriteUmbracoContent(TagHelperOutput tagHelperOutput)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput tagHelperOutput
    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • Umbraco
      • UmbracoContext
      • ViewContext
    • Methods
      • BindViewData(ContentModelBinder, ViewDataDictionary)
      • RenderSection(String, HtmlString)
      • RenderSection(String, String)
      • Write(Object)
      • WriteUmbracoContent(TagHelperOutput)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX