Tuesday, May 3, 2011

Quick TTW Contenttype Conversion Script

This is a basic working example of a through-the-web (TTW) Plone script that converts one content type into another, in this case I'm converting all News Items to Press Releases. This assumes that you are using the PressRoom add-on on your site.

I gave the script the name: convert_news_to_pressrelease

I've posted the script here:

To use the script, add a new script via the Zope Management Interface (ZMI) of your site:

And paste the content of https://gist.github.com/953299 there.

It should now be possible to append 'convert_news_to_pressrelease' to any container that has news items and they will 'magically' become press releases.

No comments:

Sign up for my upcoming Plone 5 Book & Video tutorials

plone 5 for newbies book and videos