Version 3 (modified by olha, 13 years ago) (diff) |
---|
quintagroup.transmogrifier How to …
Source: Transmogrifier, I want to .... article
1. How to omit a field from an export
section blueprint: quintagroup.transmogrifier.marshaller
You can use exclude to specify a field you want to omit on export.
[marshaller] blueprint = quintagroup.transmogrifier.marshaller exclude = abstract
(this is done at the point that marshall is used to create an xml rendition of the content item)
2. How to omit a particular content type
section blueprint: quintagroup.transmogrifier.sitewalker
You can set a condition (it has to be a Tales expression):
[sitewalker] blueprint = quintagroup.transmogrifier.sitewalker condition = python:context.getPortalTypeName() not in ('File', 'Image')
(this is done at the point that transmogrifier walks through the site)
3. How to export only a section of the site
section blueprint: quintagroup.transmogrifier.catalogsource
You can set a catalog query (rather than use a sitewalker)
[catalogsource] blueprint = quintagroup.transmogrifier.catalogsource modified = query = 2008-11-02T12:00:00Z; range = min
Note this is a slightly complex example, because the query parameter itself is a dict. You'll need to be fairly comfortable with writing catalog queries.
4. How to switch from workflow to another
You probably only need to do this if the workflow you want to abandon is not installed on the new site (and you don't want to install it). Otherwise use the types tool in site setup which does a much better job.
section blueprint: quintagroup.transmogrifier.datacorrector
With this method, you actually rewrite the xml that is generated by Marshall and packaged up as part of the content pipeline item. You'll need to write an adapter for this (up to you whether you do this as an export or import step) - which is complicated enough to need a page of instructions of its own.
5. How to migrate content from one content type to another
If this is a one-off migration, then you might want to consider your options - with just a few items to migrate you may want to think about cutting and pasting, or digging out your regular expressions to manually search and replace the xml files in between the export and import.
Alternatively, on import, you can use either the transmogrifier datacorrector blueprint to rewrite the xml or the transmogrifier xslt blueprint to transform it (the latter won't work on a mac though).
I still haven't cracked this one completely - so the following is work in progress:
Quintagroup themselves have written a couple of products undertaking specific migrations, so these give you a good idea of what you need to do. It seems to me the trick is understanding what information is conveyed by the key value pairs comprising the content pipeline item and the xml that's packaged up with the pipeline item. It's certainly possible to replace the value of a key in the pipeline item - but that probably wouldn't be enough to migrate content where fields have different names etc.
[substitution] blueprint = quintagroup.transmogrifier.substitution key = _type Blog = Weblog PloneFormMailer = FormFolder