Search Results for

    Show / Hide Table of Contents
    View Source

    Class SurfaceController

    Provides a base class for front-end add-in controllers.

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.ControllerBase
    Microsoft.AspNetCore.Mvc.Controller
    PluginController
    Namespace: Umbraco.Cms.Web.Website.Controllers
    Assembly: Umbraco.Web.Website.dll
    Syntax
    [AutoValidateAntiforgeryToken]
    public abstract class SurfaceController : PluginController, IActionFilter, IAsyncActionFilter, IFilterMetadata, IDisposable

    Constructors

    View Source

    SurfaceController(IUmbracoContextAccessor, IUmbracoDatabaseFactory, ServiceContext, AppCaches, IProfilingLogger, IPublishedUrlProvider)

    Initializes a new instance of the SurfaceController class.

    Declaration
    protected SurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, IProfilingLogger profilingLogger, IPublishedUrlProvider publishedUrlProvider)
    Parameters
    Type Name Description
    IUmbracoContextAccessor umbracoContextAccessor
    IUmbracoDatabaseFactory databaseFactory
    ServiceContext services
    AppCaches appCaches
    IProfilingLogger profilingLogger
    IPublishedUrlProvider publishedUrlProvider

    Properties

    View Source

    CurrentPage

    Gets the current page.

    Declaration
    protected virtual IPublishedContent? CurrentPage { get; }
    Property Value
    Type Description
    System.Nullable<IPublishedContent>
    View Source

    PublishedUrlProvider

    Declaration
    protected IPublishedUrlProvider PublishedUrlProvider { get; }
    Property Value
    Type Description
    IPublishedUrlProvider

    Methods

    View Source

    CurrentUmbracoPage()

    Returns the currently rendered Umbraco page

    Declaration
    protected UmbracoPageResult CurrentUmbracoPage()
    Returns
    Type Description
    UmbracoPageResult
    View Source

    RedirectToCurrentUmbracoPage()

    Redirects to the currently rendered Umbraco page

    Declaration
    protected RedirectToUmbracoPageResult RedirectToCurrentUmbracoPage()
    Returns
    Type Description
    RedirectToUmbracoPageResult
    View Source

    RedirectToCurrentUmbracoPage(QueryString)

    Redirects to the currently rendered Umbraco page and passes provided querystring

    Declaration
    protected RedirectToUmbracoPageResult RedirectToCurrentUmbracoPage(QueryString queryString)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Http.QueryString queryString
    Returns
    Type Description
    RedirectToUmbracoPageResult
    View Source

    RedirectToCurrentUmbracoUrl()

    Redirects to the currently rendered Umbraco URL

    Declaration
    protected RedirectToUmbracoUrlResult RedirectToCurrentUmbracoUrl()
    Returns
    Type Description
    RedirectToUmbracoUrlResult
    Remarks

    This is useful if you need to redirect to the current page but the current page is actually a rewritten URL normally done with something like Server.Transfer.*

    View Source

    RedirectToUmbracoPage(Guid)

    Redirects to the Umbraco page with the given id

    Declaration
    protected RedirectToUmbracoPageResult RedirectToUmbracoPage(Guid contentKey)
    Parameters
    Type Name Description
    Guid contentKey
    Returns
    Type Description
    RedirectToUmbracoPageResult
    View Source

    RedirectToUmbracoPage(Guid, QueryString)

    Redirects to the Umbraco page with the given id and passes provided querystring

    Declaration
    protected RedirectToUmbracoPageResult RedirectToUmbracoPage(Guid contentKey, QueryString queryString)
    Parameters
    Type Name Description
    Guid contentKey
    Microsoft.AspNetCore.Http.QueryString queryString
    Returns
    Type Description
    RedirectToUmbracoPageResult
    View Source

    RedirectToUmbracoPage(IPublishedContent)

    Redirects to the Umbraco page with the given published content

    Declaration
    protected RedirectToUmbracoPageResult RedirectToUmbracoPage(IPublishedContent publishedContent)
    Parameters
    Type Name Description
    IPublishedContent publishedContent
    Returns
    Type Description
    RedirectToUmbracoPageResult
    View Source

    RedirectToUmbracoPage(IPublishedContent, QueryString)

    Redirects to the Umbraco page with the given published content and passes provided querystring

    Declaration
    protected RedirectToUmbracoPageResult RedirectToUmbracoPage(IPublishedContent publishedContent, QueryString queryString)
    Parameters
    Type Name Description
    IPublishedContent publishedContent
    Microsoft.AspNetCore.Http.QueryString queryString
    Returns
    Type Description
    RedirectToUmbracoPageResult
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • SurfaceController(IUmbracoContextAccessor, IUmbracoDatabaseFactory, ServiceContext, AppCaches, IProfilingLogger, IPublishedUrlProvider)
    • Properties
      • CurrentPage
      • PublishedUrlProvider
    • Methods
      • CurrentUmbracoPage()
      • RedirectToCurrentUmbracoPage()
      • RedirectToCurrentUmbracoPage(QueryString)
      • RedirectToCurrentUmbracoUrl()
      • RedirectToUmbracoPage(Guid)
      • RedirectToUmbracoPage(Guid, QueryString)
      • RedirectToUmbracoPage(IPublishedContent)
      • RedirectToUmbracoPage(IPublishedContent, QueryString)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX