Swapping Parent-Child Publications in SDL Tridion

Tridion BluePrint changes can be difficult simply because of dependencies. Creating a BluePrint and some changes like inserting layers, adding branches, and changing priority are trivial.

You could even "copy" certain items up a BluePrint by changing releationships, making a copy, and rewiring the original setup. Again, the biggest catch is not having the right dependencies higher in the BluePrint (e.g. no templates to make pages in a content Publication)

Don't let anyone tell you BluePrint changes are impossible or extremely hard unless they understand BluePrinting and how your BluePrint is designed.

Here's an example where I swapped a Parent and Child relationship. Don't try this at home without a backup and a strong understanding of the Tridion Object Model (I'm not taking about the API).

You most likely have this in your BluePrint:

New Publication

Inserting a new Publication is simple:

  1. Create a new Publication (250 in the example), adding the same 200 parent Publication before saving
  2. Add the new 250 Publication as a parent to the 300 Publication
It's like cutting in line.



Swap

To perform a "swap" make the changes in reverse:
  1. In 300 swap parents.
  2. In 250 swap parents. 
  3. Fix names.



What can go wrong?

For most issues, Tridion will prevent you from saving a Publication change that breaks a dependency, thing includes things like:

  • Naming conflicts
  • Links to items local to a parent Publication that would break
  • Localized items in child Publications as seen below



But with clever timing or dumb luck you might be able to trick Tridion into saving an invalid reference. So always make a backup before making these types of changes and possibly validate relationships manually or with the Content Manager APIs (Core Service for the developers).

BluePrint Change in Under Five Minutes


After SDL Innovate 2014, I'm feeling bold enough to add audio and my smiling, drowsy, face. But notice the "Context Collapse" David Wesch describes. Without an audience, it's easy to draw inward.

Maybe I'll present to an SDL Buddy or when I'm more awake to liven up the presentation next time.




No comments :

Post a Comment

Feel free to share your thoughts below.

Some HTML allowed including links such as: <a href="link">link text</a>.