Privacy Info

Monday, October 17, 2022

Sitecore PowerShell - Merge Layouts


Below script will help you to merge content from layouts. PowerShell script will merge layout from Final to Shared. In the script we need to specify template id for which layouts needs to be merged.

Script

$query = "fast:/sitecore/content//*[@@templateid='{CC44DB9D-1111-4E8E-9D84-080CD8895C77}']"
Get-Item -Path "master:" -Query $query | Merge-Layout


You can customize the script as per your requirement and use it. 

Hope this information is useful to you.

No comments:

Post a Comment

Sitecore PowerShell Script - Remove item from Workflow

We came across scenario where we need to remove multiple items from workflow. If items would be less then there would not be any issue but i...