VOOZH about

URL: https://www.nuget.org/packages/XperienceCommunity.PageNavigationRedirects/

⇱ NuGet Gallery | XperienceCommunity.PageNavigationRedirects 1.1.0




👁 Image
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.
<PackageVersion Include="XperienceCommunity.PageNavigationRedirects" Version="1.1.0" />
 
Directory.Packages.props
<PackageReference Include="XperienceCommunity.PageNavigationRedirects" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add XperienceCommunity.PageNavigationRedirects --version 1.1.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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.
#:package XperienceCommunity.PageNavigationRedirects@1.1.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=XperienceCommunity.PageNavigationRedirects&version=1.1.0
 
Install as a Cake Addin
#tool nuget:?package=XperienceCommunity.PageNavigationRedirects&version=1.1.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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 Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp3.1 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 35,412 11/19/2021
1.0.0 1,184 11/5/2021
1.0.0-beta.6 392 10/20/2021
1.0.0-beta.5 368 10/11/2021
1.0.0-beta.4 309 9/24/2021
1.0.0-beta.3 300 9/23/2021
1.0.0-beta.2 301 9/23/2021
1.0.0-beta.1 289 9/23/2021