I want to transfer content of items that belong to one template into another template.
For example, I have 5 fields in first template:
- Tags
- Image
- Download link
- Title
- Date
and 5 fields in another template:
- Type
- Picture
- Download Text
- Title
- Date
Here first two fields are different in the both the templates and remaining 3 fields are same.
So I want to migrate content of items that belong to first template to the second template. Also, I would like to highlight second template is a newly created template and currently no item from that template is created. So ultimately I am modifying the template of 100 items.
I tried overriding change template method of sitecore TemplateManager.ChangeTemplate(Item item, TemplateChangeList changes)
but it empties the fields rather I want to retain the field data.
If anyone has any idea about this, please help.