The Problem We possess over 250 renderings in Sitecore, which consist of both OOB SXA renderings and custom renderings inherited from our application prior to migrating to SXA. This large number of renderings has posed challenges in implementing changes across our websites, as many updates required modifications in all modules/renderings, resulting in a significant effort due to the sheer volume of renderings. The Analysis Upon analyzing our renderings, we discovered the potential to: - Eliminate renderings that are no longer in use. - Deprecate renderings that serve the same purpose as other renderings by transitioning content to other renderings used more frequently on pages. To address this, we opted to develop a script that would list all renderings along with the pages they are utilized on. This report will provide valuable insights into our rendering usage. Initially, we considered using PowerShell, but ultimately found running the script in SQL against the Sitecore databases to
If you are working on a Sitecore solution, you will end up referring Sitecore assemblies in your solution. When you deploy your solution to a higher environment or publish it to local Sitecore instance, the Sitecore assemblies referred in solution also gets deployed/published. This creates following problems - chances of accidentally overwriting out of box Sitecore assemblies and breaking your Sitecore instance increased size of your deployment artifacts So how do you exclude Sitecore-provided assemblies when you build solutions?? The sc-packages NuGet feed includes version-specific packages that you can use to easily validate or exclude Sitecore-provided assemblies when you build solutions. You can use the below command to check these assemblies - nuget list Sitecore.Assemblies -Source https://nuget.sitecore.com/resources/v3/index.json -AllVersions How does it work? You can use custom MSBuild logic to exclude Sitecore-provided assemblies from publishing. All you have to do is to ins