Flip.Umbraco
14.0.0
dotnet add package Flip.Umbraco --version 14.0.0
NuGet\Install-Package Flip.Umbraco -Version 14.0.0
<PackageReference Include="Flip.Umbraco" Version="14.0.0" />
paket add Flip.Umbraco --version 14.0.0
#r "nuget: Flip.Umbraco, 14.0.0"
// Install Flip.Umbraco as a Cake Addin #addin nuget:?package=Flip.Umbraco&version=14.0.0 // Install Flip.Umbraco as a Cake Tool #tool nuget:?package=Flip.Umbraco&version=14.0.0
First, a quick history lesson
Cast your mind back, if you will, to the heady days of Umbraco 7. We had a fresh new backoffice, shiny and glorious.
In among the tools and features, we had that most powerful button - Change Document Type. As the name would suggest, this humble button allowed flipping content nodes from one document type to another.
Alas, when Umbraco 8 hit the scene, the Change Document Type button was lost to the annals of CMS history.
This was intentional, and sensible. Over time, Umbraco's property editors became increasingly complex, often storing large JSON data structures rather than primitive values.
That change made changing document types more difficult and error prone (although, in the wrong hands, the feature always had the potential to wreak havoc on a website).
However, deep in the bowels of Umbraco, the magic required to convert document types lay dormant. Like Smaug on his mountain of ill-gotten loot.
Flip is here to wake the dragon.
What's the deal?
Flip adds an action to the context menu to allow changing the current document to a new type.
It is not foolproof, but will provide a list of valid document types for the current location and suggest an appropriate template. When calculating valid types, Flip considers the permitted child types of the current node and its parent, so many not always allow conversion.
Once a new type is selected, users can map properties from the old/current type to the new. Unmapped properties are discarded.
Flip offers two mapping modes:
- Data type: allow mapping values to properties using the same data type (ie Textstring, of type Umbraco.Textbox)
- Property editor: allow mapping values to properties using the same property editor (ie any instance of Umbraco.Textbox)
The former results in tighter mapping rules (ie different Grid editors can only map to the exact same data type).
Buyer, beware!
Is this a super safe, bulletproof tool? No.
Does it work for most cases? Yes, probably.
For any complex data - Block Lists, Nested Content - it's probably not a great idea, but will still allow in-situ conversion of document types, which is still an easier process for editors compared to creating a new node, moving child nodes, deleting the old node, moving the new node and children.
As property mapping is opt-in, it's completely viable to map simple values, ignore Block List, and re-build the list on the new type.
To re-iterate: this is an experimental package. Experiment at your own risk.
Supported versions
Flip will play nice with Umbraco 8 and above.
Installation
Install-Package Flip.Umbraco
or dotnet add package Flip.Umbraco
Credits
Icon: flip by Joshua Weber from <a href="https://thenounproject.com/browse/icons/term/flip/" target="_blank" title="flip Icons">Noun Project</a>
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. |
-
net8.0
- Umbraco.Cms.Api.Common (>= 14.1.0 && < 15.0.0)
- Umbraco.Cms.Api.Management (>= 14.1.0 && < 15.0.0)
- Umbraco.Cms.Web.Website (>= 14.1.0 && < 15.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.