Razor tag helpers are a powerful new feature of ASP.NET Core. Redakt CMS comes with a number of tag helpers out of the box that can aid you in efficient implementation of page layouts.
Redakt tag helpers can introduce new tag names, extend standard HTML tags, or both. To make it more obvious that a tag or attribute is part of Redakt logic, Redakt custom tag names and attribute names on standard HTML tags will always start with rx-
. Only attribute names on custom tags do not start with rx-
, because it is already clear from the tag name that this is a Redakt tag.
Setup
To be able to use the Redakt tag helpers, you have to add a reference to your _ViewImports.cshtml
view. Add the following line to the bottom of the file, below the default ASP.NET Core tag helper reference:
@addTagHelper *, Redakt.Web
List of tag helpers
This is a list of built-in tag helpers that can be used with Redakt layouts. Click on the links for implementation details.
AnchorTagHelper
renders an anchor to an internal page.CanonicalTagHelper
renders a canonical URL for the page.ContentTagHelper
renders a property value from content.DictionaryTagHelper
renders a localized dictionary value.ImageTagHelper
renders an image from content.MinifyTagHelper
minifies html of an element.OpenGraphTagHelper
renders open graph tags for the page.PageCacheTagHelper
caches a html element by page.TagNameTagHelper
modified the tag name of an element.