PageAnchorTagHelper Class

PageAnchorTagHelper Class

Updates an anchor element with a Redakt page href. If there is no child content, the page title is inserted as the anchor inner html.

[HtmlTargetElement("a", Attributes = "re-page")]
[HtmlTargetElement("a", Attributes = "re-page-id")]
public class PageAnchorTagHelper: TagHelper

Inheritance  TagHelper PageAnchorTagHelper


Name Description
PageAnchorTagHelper(IRedaktContext) Default constructor. Services are injected by the IoC container.


Name Description
Default Gets or sets the action to take if the page does not exist or is not published.
Page Page object to generate a href for. Use the OwnerId property instead if you do not yet have the page object.
PageId Page id to generate a href attribute for. Only used if Page property is null.


Name Description
ProcessAsync(TagHelperContext, TagHelperOutput)