[BREAKING] Renamed and changed the behavior of the UrlType enum
- UrlType.Absolute - the absolute URL with the same host as the current request host, if possible; otherwise, the canonical (primary host) URL.
- UrlType.Canonical - the canonical absolute URL based on the primary host of the site.
- UrlType.Relative - the URL relative to the host root, i.e., without scheme and hostname parts.
- UrlType.RelativeIfSameHost - the URL relative to the host root if the specified resource is on the same host as the current request; otherwise, the absolute URL. This is the default behavior.
- UrlType.RelativeToRequestPath - the URL relative to the current request path if the specified resource is on a subpath from the current request; otherwise, the full relative URL (to the host root).
Additionally, the previously synchronous NodeViewModelExtensions.Url() method has now been made asynchronous and renamed UrlAsync().
[BREAKING] Moved extension methods to a different namespace
Several extension methods have been moved to a different namespace. You may have to change using statements if you are using extension methods from any of the following extension classes:
- NodeViewModelExtensions have been moved from Redakt.Extensions.Web to Redakt.ContentManagement.Web
- RedaktContextExtensions have been moved from Redakt.Extensions.Web to Redakt.ContentManagement.Web
- MediaExtensions have been moved from Redakt.Extensions.Web to Redakt.ContentManagement.Web
Updated Tag Helpers
Several tag helpers in the Redakt.Web.TagHelpers namespace have been added or updated.
- Added the BackgroundImageTagHelper, similar to the ImageTagHelper, which renders a background-image value in the element's style attribute. It also supports a background image-set value.
- Added the CultureTagHelper for setting the culture to be used by other tag helpers, such as the dictionary tag helper and anchor tag helper.
- Added the DefaultContentTagHelper for rendering default content if the element's current content is empty. The rx-default attribute has subsequently been removed from the ContentTagHelper.
- Added the EmptyContentTagHelper for setting the action to take when the element's content is empty. The rx-if-empty attribute has subsequently been removed from the ContentTagHelper.
- Several minor tag helper optimizations and refactoring.
- [BREAKING] Deleted the PageAnchorTagHelper since all features of this tag helper are also available from the AnchorTagHelper.
Back office editor updates
Several changes have been made to form editor controls in the back office.
- Added a Prefix parameter to the TextEditorAttribute to render a prefix to the left side of the text editor input (single line only).
- Added a Suffix parameter to the TextEditorAttribute and NumberEditorAttribute to render a suffix to the right side of the editor input.
- Added an Align parameter to the TextEditorAttribute, NumberEditorAttribute and MultilineAttribute to specify the horizontal alignment of the editor input.
- Added a Width parameter to the NumberEditorAttribute to specify the width of the editor control.
- Updated the relevant editor components to support the additional parameters of these attributes.
- [BREAKING] Removed the PrefixAttribute since that function is now available as a parameter on the relevant editor attributes.
Other minor changes in this release
- SMTP messaging is no longer registered as the default email messaging module. Use AddSmtpEmailMessaging() instead to register email messaging with the DI container.
- Updated init.ps1 script files to generate default configuration settings.
- Updated vulnerable and deprecated dependency package versions.
- Updated ImageSharp to version 3.
- Other small updates, optimizations, and refactoring.