Migrate AT content easily

by Ben Ackland on Dec 21, 2007
Filed Under:

Say you need to migrate a bunch of content types and you need to switch from an old type to a new type, the code below will do it quick and easily:

from Products.contentmigration.inplace import InplaceCMFItemMigrator

for each cabotpage in folder.objectValues():
   migrator = InplaceCMFItemMigrator(cabotpage)
   migrator.dst_portal_type = 'CabotProduct'    # change the content type
   migrator.migrate()

More info:

http://svn.plone.org/svn/collective/contentmigration/trunk/src/Products/contentmigration/

http://plone.org/documentation/tutorial/richdocument/migrations

Filed under: , , ,

Commenting has now closed on this post.

Follow us

— via Twitter

Is proudly sponsoring #BlueLightCamp today. If you want to come talk Open Source content management @HammerToe is there #blcamp
last month