1

Based on a condition, i need to move items(Components/Pages) from current publication to a specified publication.

Could anyone suggest me the approach regarding this. Thanks in Advance.

pavan
  • 451
  • 1
  • 5
  • 16

1 Answers1

9

Moving items across Publications is unfortunately not supported by the UI and also not directly by the API. But there are still two possibilities you have to accomplish this.

  1. use Content Porter to export your items and import them in the Publication you need them. You can change the mapping of the Publication as described in the Content Porter documentation, or what I usually do is just rename the Publication you want your items to go in, to the same name as where the items came from (you will have to temporarily change the name of the original Publication and after the import you can change everything back again).

  2. use the API to create a new item in the Publication of your choice and copy the contents of your item to move in there. Once that is done you can use the API to delete your original item. Depending on your BluePrinting scenario in this move action, you might need to rename your original item before you can create the new one to prevent naming conflicts (in case you are moving it up the BluePrint hierarchy).

The only downside to each of these two possibilities is that your items will get a new URI. It is not possible to keep the existing URI of your items when you need to move them across Publications. This also means that you might have to update all items using the original ones, so that they are using your new items instead. If this is required, you are most likely looking at the second option.

Bart Koopman
  • 4,835
  • 17
  • 30
  • Also, neither of these tricks will work for Catergories (because: "Name, XMLName must all be unique for items of type: Category within this Publication and its BluePrint context."), won't they? – esteewhy Aug 16 '13 at 16:21
  • Or, well, they will, but then you need a two-step process (?) – esteewhy Aug 16 '13 at 16:25
  • You must indeed expect issues when porting Categories (or creating them for that matter) in a BluePrint, if that already contains that Category. So then you will have to create it with a unique name and ID and indeed rename/change its ID later. Just one more reason to understand a BluePrint and stick to its rules at all times – Bart Koopman Aug 19 '13 at 09:03