Contentlib modify contenttype

Enonic version: 6.5.1
OS: Mac

I started out making some folder, and put a lot of content in them.
Later I found out I’d rather make the folders into actual content type (which allowes children).

But it seems I can’t use contentlib modify to change the contenttype.
Deleting the folder and re-adding the content would take a lot of time and effort.

Ideas for workaround.

  1. Rename the folder.
  2. Make the new contenttype (which allowes children)
  3. Move children from folder to contenttype (which allowes children)
  4. Delete folder

It is not possible to change the contenttype after the content has been created.

Your workaround plan seems to be the best option.
If it was multiple folders you could export the data and move the children in the file system. But for a single folder it’s easier to do it in Content Studio.

And I think we are missing a move function in lib-content, so it cannot be done with JavaScript right now.

2 Likes