presentation-switch-rendering-by-id
Switch an existing rendering with an alternate one for a specific item using item IDs. Update renderings in Sitecore layouts by specifying old and new rendering IDs.
Instructions
Switches an existing rendering specified by item ID with an alternate one for the item specified by item ID.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"itemId": "<itemId>",
"oldRenderingId": "<oldRenderingId>",
"newRenderingId": "<newRenderingId>"
},
"name": "presentation-switch-rendering-by-id"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | Yes | The ID of the item holding the renderings. | |
| oldRenderingId | Yes | The ID of the rendering to switch. | |
| newRenderingId | Yes | The ID of the new rendering. | |
| database | No | The context database. | master |
| finalLayout | No | Specifies the layout to update the rendering. If 'true', the final layout is used, otherwise - shared layout. | |
| language | No | The language version of the item holding the renderings. |