XperienceCommunity.PageNavigationRedirects 1.1.0

dotnet add package XperienceCommunity.PageNavigationRedirects --version 1.1.0                
NuGet\Install-Package XperienceCommunity.PageNavigationRedirects -Version 1.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XperienceCommunity.PageNavigationRedirects" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XperienceCommunity.PageNavigationRedirects --version 1.1.0                
#r "nuget: XperienceCommunity.PageNavigationRedirects, 1.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XperienceCommunity.PageNavigationRedirects as a Cake Addin
#addin nuget:?package=XperienceCommunity.PageNavigationRedirects&version=1.1.0

// Install XperienceCommunity.PageNavigationRedirects as a Cake Tool
#tool nuget:?package=XperienceCommunity.PageNavigationRedirects&version=1.1.0                

Xperience Page Navigation Redirects

An ASP.NET Core ResourceFilter that can redirect HTTP requests to other URLs, configurable per Page from the Xperience Administration application.

Dependencies

This package is compatible with Kentico Xperience 13 ASP.NET Core applications.

This package should be used in combination with the XperienceCommunity.PageCustomDataControlExtender

This package has a depenency on XperienceCommunity.PageBuilderUtilities, which will be installed and configured automatically.

How to Use?

See repository for details

How Does It Work?

As of Kentico Xperience Refresh 3, the Page Navigation feature from previous non-Mvc versions of the platform has not been added back.

This feature relied on the CMS_Document table DocumentMenuRedirectUrl column, which meant it was available for all Pages Types, but this column no longer exists.

By using the XperienceCommunity.PageCustomDataControlExtender package, we can store the data for this feature in the CMS_Document table DocumentCustomData column, making it available for all Page Types.

The three fields we add to the custom Page Type allows us to handle the most common redirection scenarios:

  • No redirection
    • Normal behavior in which navigating to the Page's URL alias will load that Page's content
  • Internal redirection
    • Content Managers can select another Page in the Content Tree to redirect to. This stores the destination Page's NodeGUID, which means the destination Page can be moved around and we'll always redirect to the correct URL
  • External redirection
    • Content Managers can enter any valid URL to redirect to
  • First Child
    • The first child Page will be the destination for redirection, so that NodeOrder of child Pages effectively controls the redirection URL
    • Children can be limited to a specific Page Type via Class Name if there are children of multiple Page Types

All of the redirects can be set to be 301 or 302 globally (global default is 302), and then overridden per-Page.

The Navigation Redirect values can be stored in either TreeNode.DocumentCustomData (the default) or TreeNode.NodeCustomData, depending on the library's configuration.

An ASP.NET Core Resource Filter has access to the PageDataContext when using Content Tree based routing (custom routing can control redirects programatically). The PageDataContext includes the current TreeNode, and accessing the Page Navigation Redirection values for the given Page allows the Resource Filter to perform the appropriate redirection.

This package will log Page configuration errors (missing required values, references to deleted or non-existant Pages) to the Kentico Xperience Event Log under the source PageNavigationRedirects, with various event codes depending on the redirection type.

References

ASP.NET Core

Kentico Xperience

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 23,020 11/19/2021
1.0.0 999 11/5/2021
1.0.0-beta.6 250 10/20/2021
1.0.0-beta.5 228 10/11/2021
1.0.0-beta.4 174 9/24/2021
1.0.0-beta.3 165 9/23/2021
1.0.0-beta.2 165 9/23/2021
1.0.0-beta.1 151 9/23/2021