Class PlaceholderTagHelper
Version: 21.x
Tag helper for the Sitecore placeholder element.
Inheritance
System.Object
PlaceholderTagHelper
Namespace: Sitecore.AspNet.RenderingEngine.TagHelpers
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
RequestResponse
public class PlaceholderTagHelper : TagHelperConstructors
PlaceholderTagHelper(IComponentRendererFactory, IEditableChromeRenderer)
Initializes a new instance of the PlaceholderTagHelper class.
Declaration
RequestResponse
public PlaceholderTagHelper(IComponentRendererFactory componentFactory, IEditableChromeRenderer chromeRenderer)Parameters
| Type | Name | Description |
|---|---|---|
| IComponentRendererFactory | componentFactory |
An instance of IComponentRendererFactory. |
| IEditableChromeRenderer | chromeRenderer |
An instance of IEditableChromeRenderer. |
Properties
Name
Gets or sets the name of the placeholder to be rendered.
Declaration
RequestResponse
public string Name { get; set; }Property Value
| Type | Description |
|---|---|
| System.String |
ViewContext
Gets or sets the current view context for the tag helper.
Declaration
RequestResponse
public ViewContext ViewContext { get; set; }Property Value
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.ViewContext |
Methods
ProcessAsync(TagHelperContext, TagHelperOutput)
Declaration
RequestResponse
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext | context | |
| Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput | output |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |