I know you can export and import a content type between apps. But how can I duplicate a content type? If they have similar fields (title, content, link, etc), having to enter them all again seems like a waste of time.
Asked
Active
Viewed 51 times
1 Answers
0
So there is no automatic way. If you do this a lot, there's a big chance you're doing something wrong (DRY - don't repeat yourself).
But: if for whatever reason you need to do it, here's a quick checklist
- Go to https://www.guidgenerator.com/ and get yourself a brand new GUID
- Export the json of the type you want to duplicate
- In the json find the primary guid of the item you need - edit it in the text editor (also change the name so you won't get confused)
- Then drag the json back unto the admin-ui to re-import it with the new id

iJungleBoy
- 5,325
- 1
- 9
- 21
-
Thanks, iJungleBoy! – DNNdiva Dec 02 '21 at 17:28
-
This json contains the EntityId and EntityGuid for all the fields inside the content type. Wouldn't this instruction mess the content type? "ContentType": { "Id": "49dd614b-4ce7-49fa-910f-c3ec9e77d2e6", "Name": datatype", ... ,"Attributes": [{"Name": "fieldOne", "Type": "String", "InputType": "string-default", "IsTitle": true, "Metadata": [{"Id": 22213, "Version": 1, "Guid": "478c9f57-f5f7-484d-b70b-045bf23ad133",... – João Gomes Aug 25 '23 at 22:46
-
You wouldn't want to change the ContentType information, just the GUID of the entity to import. It's still the same content-type. – iJungleBoy Aug 28 '23 at 05:59