wiki:quintagroup.transmogrifier/ContentTypeChange

Changing the ContentType of object while migrating content with quintagroup.transmogrifier

Type conversion can be done on content import.

Item import process consists of two steps:

  1. object has to be created
  2. object is updated with field values and other attributes

The correction for the first step can be done with substitution pipeline, the second one - with xslt pipeline. Alternatively, you can use datacorrector pipeline, but it will require registering specific corrector adapters.

The quintagroup.transmogrifier.substitution? blueprint is used in tandem with quintagroup.transmogrifier.xslt?

In your import configuration (import.cfg) insert substitution exactly before the constructor pipeline, then xslt goes. And it should look like:

pipeline =
    ...
    substitution
    constructor
    xslt
    ...

We are going to replace Large Plone Folder with Folder, it is basic example in getting Members folder imported into Plone 4. The item's key for content_type is _type and the old value is saved in _old_type.

[substitution]
blueprint = quintagroup.transmogrifier.substitution
key = _type
Large Plone Folder = Folder

In xslt section we also have to mention the keys as values for from-key and to-key options.

[xslt]
blueprint = quintagroup.transmogrifier.xslt
source = marshall
from-key = _old_type
to-key = _type

Detailed description of pipelines is available here:

Last modified 13 years ago Last modified on Mar 21, 2011 3:18:04 PM