View Source
Class TemplateController
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.ControllerBase
Assembly: Umbraco.Web.BackOffice.dll
Syntax
[PluginController("UmbracoApi")]
[Authorize(Policy = "TreeAccessTemplates")]
public class TemplateController : BackOfficeNotificationsController, IUmbracoFeature, IDiscoverable
Constructors
View Source
TemplateController(IFileService, IUmbracoMapper, IShortStringHelper)
Declaration
public TemplateController(IFileService fileService, IUmbracoMapper umbracoMapper, IShortStringHelper shortStringHelper)
Parameters
View Source
TemplateController(IFileService, IUmbracoMapper, IShortStringHelper, IDefaultViewContentProvider)
Declaration
[ActivatorUtilitiesConstructor]
public TemplateController(IFileService fileService, IUmbracoMapper umbracoMapper, IShortStringHelper shortStringHelper, IDefaultViewContentProvider defaultViewContentProvider)
Parameters
Methods
View Source
DeleteById(Int32)
Deletes a template with a given ID
Declaration
[HttpDelete]
[HttpPost]
public IActionResult DeleteById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.IActionResult |
|
View Source
GetAll()
Declaration
public IEnumerable<EntityBasic>? GetAll()
Returns
Type |
Description |
System.Nullable<IEnumerable<EntityBasic>> |
|
View Source
GetByAlias(String)
Declaration
public TemplateDisplay GetByAlias(string alias)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
Returns
View Source
GetById(Guid)
Gets the template json for the template guid
Declaration
public ActionResult<TemplateDisplay> GetById(Guid id)
Parameters
Type |
Name |
Description |
Guid |
id |
|
Returns
View Source
GetById(Int32)
Gets the template json for the template id
Declaration
public ActionResult<TemplateDisplay> GetById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
GetById(Udi)
Gets the template json for the template udi
Declaration
public ActionResult<TemplateDisplay> GetById(Udi id)
Parameters
Type |
Name |
Description |
Udi |
id |
|
Returns
View Source
GetScaffold(Int32)
Declaration
public TemplateDisplay GetScaffold(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
PostSave(TemplateDisplay)
Declaration
public ActionResult<TemplateDisplay> PostSave(TemplateDisplay display)
Parameters
Returns