presentation-switch-rendering
Switch an existing Sitecore item rendering to a different rendering. Use the returned new UniqueId for follow-up calls because the old rendering instance no longer exists.
Instructions
Switches an existing rendering on an item with an alternate one. The switched instance gets a NEW uniqueId (SPE regenerates it); the tool returns one row per switched instance with the new UniqueId, RenderingID, Placeholder and Datasource — use that UniqueId for any follow-up call, the old one no longer exists.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The ID of the item holding the renderings. Supply this or path. | |
| path | No | The path of the item holding the renderings. Supply this or id. | |
| database | No | The context database. Sent when addressing by ID -- a path carries its own database prefix (e.g. master:/sitecore/content/Home). | master |
| language | No | The language version of the item holding the renderings. | |
| uniqueId | No | The unique ID of the rendering instance to switch. Supply this, oldRenderingId or oldRenderingPath. | |
| finalLayout | No | Target the final layout (default true), where list-renderings' uniqueIds live. False = shared only. | |
| newRenderingId | No | The ID of the new rendering. Supply this or newRenderingPath. | |
| oldRenderingId | No | The ID of the rendering to switch; every instance of it on the item is switched. Supply this, oldRenderingPath or uniqueId. | |
| newRenderingPath | No | The path of the new rendering. Supply this or newRenderingId. | |
| oldRenderingPath | No | The path of the rendering to switch; every instance of it on the item is switched. Supply this, oldRenderingId or uniqueId. |