Friday, July 21, 2017

Powershell - Import physical files to Sitecore media library


In some cases we need to import physical files to Sitecore media library, for example if we have pdf files issued by third party and Sitecore use these files to be shown for the client.
  • Install Sitecore PowerShell extensions on Sitecore Server
  • Enable Sitecore File watcher
  • Create new PowerShell script
  • Create new schedule task to run the PowerShell script 
PowerShell script include the following functionalities:
  • Copy physical files from source folder to the destination folder (this folder supposed to be site Media folder under the site root
  • Check site publish targets to insure that all imported media published to all publish targets for the site
  • Start publish process from master to each publish target







Sitecore : Rendering Exception Handling

To prevent showing yellow crash page if an error raised in one of Sitecore controls  and keep handle errors for developers without showing ...