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
Assembly: Umbraco.Web.Website.dll
Syntax
[AutoValidateAntiforgeryToken]
public abstract class SurfaceController : PluginController, IActionFilter, IAsyncActionFilter, IFilterMetadata, IDisposable, IDiscoverable
Constructors
View Source
SurfaceController(IUmbracoContextAccessor, IUmbracoDatabaseFactory, ServiceContext, AppCaches, IProfilingLogger, IPublishedUrlProvider)
Declaration
protected SurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, IProfilingLogger profilingLogger, IPublishedUrlProvider publishedUrlProvider)
Parameters
Properties
View Source
CurrentPage
Declaration
protected virtual IPublishedContent CurrentPage { get; }
Property Value
View Source
PublishedUrlProvider
Declaration
protected IPublishedUrlProvider PublishedUrlProvider { get; }
Property Value
Methods
View Source
CurrentUmbracoPage()
Returns the currently rendered Umbraco page
Declaration
protected UmbracoPageResult CurrentUmbracoPage()
Returns
View Source
RedirectToCurrentUmbracoPage()
Redirects to the currently rendered Umbraco page
Declaration
protected RedirectToUmbracoPageResult RedirectToCurrentUmbracoPage()
Returns
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
View Source
RedirectToCurrentUmbracoUrl()
Redirects to the currently rendered Umbraco URL
Declaration
protected RedirectToUmbracoUrlResult RedirectToCurrentUmbracoUrl()
Returns
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
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
View Source
RedirectToUmbracoPage(IPublishedContent)
Redirects to the Umbraco page with the given published content
Declaration
protected RedirectToUmbracoPageResult RedirectToUmbracoPage(IPublishedContent publishedContent)
Parameters
Returns
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