Pages

17 January, 2023

Sitecore PowerShell - All Page Layout Data Report

Recently, for a migration project, I have been mostly working on Sitecore PowerShell to create reports and content exports. One of the ask from the client is to find out the unique set of pages with certain renderings in a template. So, the solution is to get the list of renderings of the page and find out the number of occurrences of each rendering. By which we can plan for bulk content export on those pages alone and leave the rest for manual migration. 

The below PowerShell script will help you to choose a root folder and it will export the data as below. 


You may consider this as a base script, and you should be able to make use of RenderingDefinition properties to group the component based on your need in line 49. Refer line 53 to 73 for the RenderingDefinition properties. 

Once we got the data, we used the Excel Pivot chart to group the results by Template Name and Layout.






No comments:

Post a Comment

blockquote { margin: 0; } blockquote p { padding: 15px; background: #eee; border-radius: 5px; } blockquote p::before { content: '\201C'; } blockquote p::after { content: '\201D'; }