Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Robin Hansen 135 posts 368 karma points
    May 12, 2014 @ 12:51
    Robin Hansen
    0

    Mass change of doctypes

    I'm modifying an Umbraco site with approx. 1000+ notes in the content tree... - The way the site was build originally was not very clever or done by 'best practices' at all...

    Therefore it would be very helpfull with somekind of a batch-script that will do the job of changing the docTypes and mapping - rather than using the UI feature on each note... - any idears...?

  • Charles Afford 1163 posts 1709 karma points
    May 26, 2014 @ 20:57
    Charles Afford
    0

    I was looking at a programatic way of doing this.  But at the moment there is no way to change it

    Charlie

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    May 26, 2014 @ 22:00
    Chriztian Steinmeier
    0

    Hi Robin + Charles,

    You could try doing that with XSLT and packages:

    1. Create a package with all content; download and unzip it to find the package.xml file
    2. Transform the contents of that file into a new package.xml file, doing all the mapping needed
    3. Zip the package.xml file and install as a new package

    I have successfully updated Dcotypes and added new content to sites using this approach; haven't tried changing a node's doctype though - but should be easy to test. If the new package use the same ids it might just work?

    Needless to say: Don't try it without a complete backup of everything!

    /Chriztian

  • Charles Afford 1163 posts 1709 karma points
    May 26, 2014 @ 22:36
    Charles Afford
    0

    Thanks Chriztian :)

    I might try and see if there is a way to change the doc type on a node programaticlly, although i can think of a number of problems you run into,

    Charlie

Please Sign in or register to post replies

Write your reply to:

Draft