Search Results for

    Show / Hide Table of Contents
    View Source

    Class UmbracoPageController

    An abstract controller for a front-end Umbraco page

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.ControllerBase
    Microsoft.AspNetCore.Mvc.Controller
    UmbracoController
    Namespace: Umbraco.Cms.Web.Common.Controllers
    Assembly: Umbraco.Web.Common.dll
    Syntax
    public abstract class UmbracoPageController : UmbracoController, IActionFilter, IAsyncActionFilter, IFilterMetadata, IDisposable

    Constructors

    View Source

    UmbracoPageController(ILogger<UmbracoPageController>, ICompositeViewEngine)

    Initializes a new instance of the UmbracoPageController class.

    Declaration
    protected UmbracoPageController(ILogger<UmbracoPageController> logger, ICompositeViewEngine compositeViewEngine)
    Parameters
    Type Name Description
    Microsoft.Extensions.Logging.ILogger<UmbracoPageController> logger
    Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine compositeViewEngine

    Properties

    View Source

    CurrentPage

    Gets the current content item.

    Declaration
    protected virtual IPublishedContent CurrentPage { get; }
    Property Value
    Type Description
    IPublishedContent
    View Source

    UmbracoRouteValues

    Gets the UmbracoRouteValues

    Declaration
    protected virtual UmbracoRouteValues UmbracoRouteValues { get; }
    Property Value
    Type Description
    UmbracoRouteValues

    Methods

    View Source

    CurrentTemplate<T>(T)

    Gets an action result based on the template name found in the route values and a model.

    Declaration
    protected virtual IActionResult CurrentTemplate<T>(T model)
    Parameters
    Type Name Description
    T model

    The model.

    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.IActionResult

    The action result.

    Type Parameters
    Name Description
    T

    The type of the model.

    View Source

    EnsurePhsyicalViewExists(String)

    Ensures that a physical view file exists on disk.

    Declaration
    protected bool EnsurePhsyicalViewExists(string template)
    Parameters
    Type Name Description
    System.String template

    The view name.

    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • UmbracoPageController(ILogger<UmbracoPageController>, ICompositeViewEngine)
    • Properties
      • CurrentPage
      • UmbracoRouteValues
    • Methods
      • CurrentTemplate<T>(T)
      • EnsurePhsyicalViewExists(String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX