Search Results for

    Show / Hide Table of Contents
    View Source

    Class RenderController

    Represents the default front-end rendering controller.

    Inheritance
    object
    ControllerBase
    Controller
    UmbracoController
    UmbracoPageController
    Namespace: Umbraco.Cms.Web.Common.Controllers
    Assembly: Umbraco.Web.Common.dll
    Syntax
    [ModelBindingException]
    public class RenderController : UmbracoPageController, IRenderController, IDiscoverable

    Constructors

    View Source

    RenderController(ILogger<RenderController>, ICompositeViewEngine, IUmbracoContextAccessor)

    Initializes a new instance of the RenderController class.

    Declaration
    public RenderController(ILogger<RenderController> logger, ICompositeViewEngine compositeViewEngine, IUmbracoContextAccessor umbracoContextAccessor)
    Parameters
    Type Name Description
    ILogger<RenderController> logger
    ICompositeViewEngine compositeViewEngine
    IUmbracoContextAccessor umbracoContextAccessor

    Properties

    View Source

    UmbracoContext

    Gets the umbraco context

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

    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 override IActionResult CurrentTemplate<T>(T model)
    Parameters
    Type Name Description
    T model

    The model.

    Returns
    Type Description
    IActionResult

    The action result.

    Type Parameters
    Name Description
    T

    The type of the model.

    Remarks

    If the template found in the route values doesn't physically exist, Umbraco not found result is returned.

    View Source

    Index()

    The default action to render the front-end view.

    Declaration
    public virtual IActionResult Index()
    Returns
    Type Description
    IActionResult
    View Source

    OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)

    Before the controller executes we will handle redirects and not founds

    Declaration
    public override Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
    Parameters
    Type Name Description
    ActionExecutingContext context
    ActionExecutionDelegate next
    Returns
    Type Description
    Task
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX