XperienceCommunity.PageEditButton
1.1.0
dotnet add package XperienceCommunity.PageEditButton --version 1.1.0
NuGet\Install-Package XperienceCommunity.PageEditButton -Version 1.1.0
<PackageReference Include="XperienceCommunity.PageEditButton" Version="1.1.0" />
<PackageVersion Include="XperienceCommunity.PageEditButton" Version="1.1.0" />
<PackageReference Include="XperienceCommunity.PageEditButton" />
paket add XperienceCommunity.PageEditButton --version 1.1.0
#r "nuget: XperienceCommunity.PageEditButton, 1.1.0"
#:package XperienceCommunity.PageEditButton@1.1.0
#addin nuget:?package=XperienceCommunity.PageEditButton&version=1.1.0
#tool nuget:?package=XperienceCommunity.PageEditButton&version=1.1.0
Xperience Community: Page Edit Button
Description
This package provides content editors with a button displayed on web channel pages, that allows them to quickly navigate to the right place in the Xperience by Kentico administration interface to edit the page.
NOTE: As mentioned in a Q&A discussion, this button will only appear if the user is authenticated to an admin portal that is on the same domain as the front-end site. For subdomain scenarios (e.g., admin.domain.com for admin and www.domain.com for the site), see the Configuration section below.
In older versions of Kentico using Portal Engine (ASP.NET Web Forms), this functionality was provided through a button like this:
With this package, you can add a similar button to your Xperience by Kentico website channels. It will be displayed in the bottom right corner of the page:
Library Version Matrix
| Xperience Version | Library Version |
|---|---|
| >= 29.1.4 | 1.0.0+ |
Dependencies
Package Installation
Add the package to your application using the .NET CLI
dotnet add package XperienceCommunity.PageEditButton
Quick Start
Install NuGet package above.
Add the following Tag Helper directive to your
_ViewImports.cshtml:@addTagHelper *, XperienceCommunity.PageEditButtonAdd the
PageEditButtonViewComponent andpage-edit-button-stylesTag Helper to your layout template_Layout.cshtml:<page-edit-button-styles /> </head> <body> <vc:page-edit-button />Load a page after authenticating to the Xperience by Kentico administration interface. The button will appear in the bottom right corner of the page.
Configuration
Admin Domain Configuration (For Subdomain Scenarios)
If your Xperience administration interface is hosted on a subdomain (e.g., admin.domain.com) separate from your website channels (e.g., www.domain.com, shop.domain.com), you need to configure the admin domain so the edit button generates the correct URL.
Example scenario:
- Website channels:
www.domain.com,shop.domain.com - Admin interface:
admin.domain.com
Without configuration, the button would incorrectly link to https://www.domain.com/admin/... instead of https://admin.domain.com/admin/...
Important: This configuration only works for subdomains of the same root domain (e.g., admin.domain.com and www.domain.com). This is because the button visibility depends on authentication cookies, which must be shared across the subdomains. For completely different domains, the authentication cookie will not be accessible and the button will not appear.
To share authentication cookies across subdomains, you must configure your authentication cookie domain in your application's authentication setup (e.g., setting the cookie domain to .domain.com).
Setup Instructions
Add the following configuration to your
appsettings.json:{ "PageEditButtonOptions": { "AdminDomain": "admin.domain.com" } }Register the options in your
Program.cs:using XperienceCommunity.PageEditButton.Options; var builder = WebApplication.CreateBuilder(args); // Register PageEditButton options builder.Services.Configure<PageEditButtonOptions>( builder.Configuration.GetSection("PageEditButtonOptions")); // ... rest of your configurationThe edit button will now generate absolute URLs pointing to your configured admin domain.
Note: If you don't configure an admin domain, the button will use relative URLs (current domain), which works fine for single-domain setups or when the admin is hosted at /admin on the same domain as your website channel.
Contributing
Feel free to submit issues or pull requests to the repository, this is a community package and everyone is welcome to support.
License
Distributed under the MIT License. See LICENSE.md for more information.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Kentico.Xperience.Admin (>= 29.1.4)
- Kentico.Xperience.webapp (>= 29.1.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.