How to move Components up the Blueprint chain using Content Porter

Introduction

In a situation where you have a number of components created at a low level (French Web) in the BluePrint hierarchy and want to use them elsewhere in the BluePrint structure, you will notice that you cannot do that. This article demonstrates how you can achieve the goal of using Components elsewhere by using Content Porter to move them to a different Publication. Imagine you have a low level Publication (French Web). This Publication contains a number of Components which are added to a number of Component Presentations in Pages. You want to use some of the Components from this Publication elsewhere (e.g. Spanish Web and Dutch Web). You need to move them up a level (to Global Web), so that they can then be inherited to the other Publications. Of course you would still want the current pages (French Web) to show the Components after they have been moved.

Prerequisites

Tridion Content Management system setup with a BluePrint structure as shown in the image below. It is required to delete all the relevant Pages and Components during this process.  Therefore you should be 100% certain of the process you execute. It is recommended that you test this process in a test environment before deleting production data. It is also recommended that you have an up to date backup of your production database before commencing this process.

1. Overview

  1. Export all Pages from the Child Publication (keep content dependencies, so Components will be exported as well)
  2. Un-publish and delete the Pages and Components in the Child Publication
  3. Import only the Components in the Parent Publication (change mapping for Publication title)
  4. Import the Pages into the Child Publication (without dependencies)
  5. Re-publish the relevant Pages   

2. Export the Pages and Components

Start Content Porter and choose Exporting content from a Tridion Content Manager to an intermediate format. At the "Select item type filters" step you can exclude all the item types, except for Pages and Components:

You should keep the content associated with the Pages. Therefore you should not exclude content at the "Select filter groups" step.

At the "Select Content Manager items for export" step, you only need to select the Pages (you do not need to select Components).
After you finish the export, perform the following actions:

  1. Unpublish the Pages
  2. Delete the Pages
  3. Delete the Components

3. Import the Components

We want to import the components into a higher Publication. To do this was have to edit the C:\Program Files\Tridion\ContentPorter\myFolder\mappings.xml file.
You need to add a mapping to move items from the original Publications to the new higher level.
E.g. change the following XML
<tcccp:Itemset role="Publication">
<tcccp:Mapping ExportContext="" ExportTitle="French Web" ImportContext="" ImportTitle=""/>   
to
<tcccp:Itemset role="Publication">
<tcccp:Mapping ExportContext="" ExportTitle="French Web" ImportContext="" ImportTitle="Global Web"/>   
Start Content Porter to import the Components into the management system. Choose Importing content from an intermediate format to a Tridion Content Manager.  At the "Select item type filters" step, check the boxes of the following item types:

  • Target Groups
  • Schemas
  • Template Building Blocks
  • Component Templates
  • Page Templates
  • Pages             

You do not need any of the dependent content so you will have to check all the default filter groups on the next step in Content Porter:

  • Layout
  • Structure
  • Content
  • Definition
  • Default content             

At the "Select Content Manager items for export" step, select the Components to import and start the import process.

4. Import the pages

We only want to import the pages and we want to recreate them in the low level Publication, so we undo our changes to the mappings.xml file.
E.g. change the following XML
<tcccp:Itemset role="Publication">
<tcccp:Mapping ExportContext="" ExportTitle="French Web" ImportContext="" ImportTitle="Global Web"/>   
to
<tcccp:Itemset role="Publication"> <tcccp:Mapping ExportContext="" ExportTitle="French Web" ImportContext="" ImportTitle=""/>   
Start Content Porter to import the Pages into the management system. Choose Importing content from an intermediate format to a Tridion Content Manager.  At the "Select item type filters" step, check the boxes of the following item types:

  • Target Groups
  • Schemas
  • Components
  • Template Building Blocks
  • Component Template
  • Page Templates         

Do not exclude Pages.
You do not need any of the dependent content so you will have to check all the default filter groups on the "Select filter groups" step:

  • Layout
  • Structure
  • Content
  • Definition
  • Default content        

At the "Select Content Manager items for export" step, select the Pages to import and start the import process.
If all previous actions succeeded you can re-publish the Pages that you unpublished before.

Result

After you have performed all the steps, the Components are moved from the child Publication(s) (e.g. French Web) to the parent Publication (Global Web). This parent Publication now contains all the items. The Component Presentations of the Pages in the child Publications use the Components from the parent Publication (Global Web).