Skip to main content

Posts

Showing posts from August, 2020

Sitecore PowerShell Script to create all language versions for an item from en version

  We have lots of media items and our business wants to copy the data from en version of media item to all other language versions defined in System/Languages. This ensures that media is available in all the languages. So, we created the below powershell script to achieve the same -  #Get all language versions defined in System/Languages $languages = Get-ChildItem /sitecore/System/Languages -recurse | Select $_.name | Where-Object {$_.name -ne "en"} | Select Name #Ensuring correct items are updated by comparing the template ID  $items = Get-ChildItem -Path "/sitecore/media library/MyProjects" -Recurse | Where-Object {'<media item template id>' -contains $_.TemplateID} #Bulk update context to improve performance New-UsingBlock (New-Object Sitecore.Data.BulkUpdateContext) { foreach($item in $items){    foreach($language in $languages){ $languageVersion = Get-Item -Path $item.Paths.Path -Language $language.Name #Check if language versi

Export Sitecore media library files to zip using SPE

If you ever require to export Sitecore media files to zip (may be to optimize them), SPE (Sitecore Powershell Extension) has probably the easiest way to do this for you. It's as easy as the below 3 steps -  1. Right click on your folder (icons folder in snap)>Click on Scripts> Click on Download 2. SPE will start zipping all the media files placed within this folder. 3. Once zipping is done, you will see the Download option in the next screen. Click Download Zip containing the media files within is available on your local machine. You can play around with the images now. Hope this helps!! Like and Share ;)

New Features in Sitecore 10 : Is it Worthy?

Finally Sitecore 10  is out and all the Sitecore developers are going crazy at this moment, especially the MVPs :P LinkedIn has flooded with Sitecore 10 blogs about the first installation experience, the introduction of new features etc. So I got curious ( like w asnt 9.3 launched a while back.. )  and, when got a chance, deep dived into the Sitecore 10 Release Notes to understand what the newer version brings to the table for developers. Here is the list of Sitecore 10 features which I believe still makes it worthy in content management ecosystem - Infrastructure-as-code - Sitecore 10 officially supports Docker, Kubernetes and new Sitecore-provided image repositories. This is really going to speed up on-boarding process for new developers into the project. So, Infrastructure-as-code enables the local setup to be source controlled (like code). New members have to setup the local repository and run few commands to setup their local instance. What's even greater is that the local se