Phantasmal.Umbraco.VariantDeleter
1.1.0
dotnet add package Phantasmal.Umbraco.VariantDeleter --version 1.1.0
NuGet\Install-Package Phantasmal.Umbraco.VariantDeleter -Version 1.1.0
<PackageReference Include="Phantasmal.Umbraco.VariantDeleter" Version="1.1.0" />
<PackageVersion Include="Phantasmal.Umbraco.VariantDeleter" Version="1.1.0" />
<PackageReference Include="Phantasmal.Umbraco.VariantDeleter" />
paket add Phantasmal.Umbraco.VariantDeleter --version 1.1.0
#r "nuget: Phantasmal.Umbraco.VariantDeleter, 1.1.0"
#:package Phantasmal.Umbraco.VariantDeleter@1.1.0
#addin nuget:?package=Phantasmal.Umbraco.VariantDeleter&version=1.1.0
#tool nuget:?package=Phantasmal.Umbraco.VariantDeleter&version=1.1.0
Variant deleter
An Umbraco 17 extension that adds a Delete Variant action to the document tree. It removes the selected language's variant from a document and returns the node to the bracketed NotCreated state, as if the variant had never existed.
Umbraco core can only unpublish a culture, which leaves a draft that still shows in the tree (see Umbraco-CMS #9735). This extension closes that gap. It ships the backoffice UI and the server API.
Install
dotnet add package Phantasmal.Umbraco.VariantDeleter
Restart the site. The VariantDeleterComposer registers the service, the controller, and the backoffice extension automatically. No configuration is required.
How it works
VariantDeleterService removes a culture variant. It guards the default and mandatory languages, unpublishes the culture if needed, clears the content schedule, nulls the variant property values, then calls SetCultureName(null, culture) and saves. VariantController exposes DELETE /umbraco/management/api/v1/variant/{id}?culture={isoCode} and checks the user's Delete permission on the document.
The frontend registers an entity action on the document type (weight 490, below Unpublish), gated by the Umb.Document.Delete permission. It validates the variant, asks for confirmation, calls the endpoint, and refreshes the tree.
Notes
There is no recycle bin for variants, so the action cannot be undone and the confirmation says so. Clearing a variant value nulls the editor data but does not delete the underlying rows from umbracoPropertyData. To an editor the variant is gone.
Build the frontend
cd src/Phantasmal.Umbraco.VariantDeleter/Client
npm install
npm run build
The output goes to wwwroot/App_Plugins/VariantDeleter/dist. A built copy is committed.
Pack
dotnet pack src/Phantasmal.Umbraco.VariantDeleter/Phantasmal.Umbraco.VariantDeleter.csproj -c Release
Compatibility
Umbraco 17.3 and later. Requires a multi-language site with culture variation enabled.
Licence
MIT. See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Umbraco.Cms.Api.Management (>= 17.4.2)
- Umbraco.Cms.Web.Website (>= 17.4.2)
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 |
|---|