Change a preexisting instance of a Page Type to another Page Type

Christopher Conley asked on June 22, 2018 22:03

Our website currently uses a catchall Page Type for news. This page type has a DDL which is used to specify the type of news (article, press release, video, etc.) it is, and then through the magic of visibility rules and dependency the proper fields are exposed to the content editor. We thought we were pretty slick when we put this together and it worked fine for a time.

However we're in a situation where things have become overly complex, and we have a need to break out these news subtypes into their own standalone Page Types. Specifically, we're trying to avoid having to re-do data entry on 4-ish years worth of material.

How screwed are we? Am I limited to writing some crazy SQL queries to get this accomplished or is there any other kind of mechanism I can leverage to get this done? My Google-fu has not produced anything very usable at this time.

Thank you in advance for your time.

Correct Answer

Brenden Kehren answered on June 22, 2018 22:22

Currently there is nothing publicly available to "convert" one page type to another page type. Your best bet would be to use the API but if all needed to be done you could use SQL queries. Only downfall with SQL queries is you'd need to update your version history and that's not all that easy when the version history data is stored in XML. If you don't update the version history, when you upgrade, you'll get errors because of orphaned records and inconsistent data.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Peter Mogilnitski answered on June 22, 2018 22:22 (last edited on June 24, 2018 16:39)

What you need to do is to create master page type - i.e. "News Master" that will hold all common fields. All your child page types (article, press release, video, etc.) will inherit from it. They will have type specific fields plus all fields from the master. If you add field to master - it will automatically appears in its children, but not vice versa. It is hard for me to predict how much work this is, because i don't know your situation. Creating types and moving data is not that complicated. Changing SQL queries, if they all are under one page type and not spread all over ...

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.