Skip to main content

Posts

Showing posts with the label Sitecore

Speed Up Sitecore Website Performance

 Speed Up Sitecore Website Performance Performance is an essential part of any website. Slow website performance can be frustrating to users, and it can impact the business as well. Faster websites keep visitors on the website and visitors interact for a long time as well as the search engines will rank better faster. Page speed is important for better SEO ranking, lower bounce rate, and higher conversion rates. What is website page load time? Website page load time means how long a website takes to load fully and appear on screen including all content, text, images, and videos. Page speed can be dependent on several factors like file size, website server, inefficient code, third-party integration, caching, etc. Below are a few points that will be helpful to speed website performance: Sitecore Caching Caching is an essential part of a performance. Sitecore uses different types of caching layers like HTML cache, item cache, data cache, and prefetch cache to improve the performance. It i

Sitecore Powershell Script to Update Datasource Path In Final Rendering

Sitecore Powershell Script to Update Datasource Path In Final Rendering  In project, there was a requirement to update datasource for specific rendering so to update the rendering datasource I wrote below PowerShell script.   Function Change-RenderingDatasourceInAllPages{ Param( [Parameter(Mandatory=$true)] [String]$PagesRoot, [Parameter(Mandatory=$true)] [String]$Placeholder, [Parameter(Mandatory=$true)] [String]$DataSourcePath, [Parameter(Mandatory=$true)] [String]$ItemId ) $pages = @(get-item $PagesRoot) $pages += @(get-childitem -Path $PagesRoot -Recurse) $defaultLayout = Get-LayoutDevice "Default" foreach($page in $pages) { Get-Rendering -Item $page -Device $defaultLayout -FinalLayout -Placeholder $Placeholder | ForEach { if($_.ItemID -eq $ItemId) { $_.Datasource=$DataSourcePath Set-Rendering -Item $page -Instance $_ -FinalLayout:$True

Sitecore 9 Forms :  Alphanumeric Captcha

Sitecore 9 Forms :  Alphanumeric Captcha As you know Recaptcha is not available on Sitecore 9.0.1 and Sitecore 9.0.2 forms, so I thought to create custom Google Recaptcha but my issue was Google Recaptcha was not working properly on Internet Explorer as it was asking 10 to 15 times to verify which is very frustrating, at the same time it was working for another browser so I thought to create custom Alphanumeric captcha as per client requirement. In previous blog, we have checked how to create Google reCaptcha field. Now we are going to create Alphanumeric Captcha using below steps: Create new viewmodel class AlphaNumericViewModel.cs [Serializable()]     public class AlphaNumericViewModel : StringInputViewModel     {         protected override void InitItemProperties(Item item)         {             base .InitItemProperties(item);         }     }   Create Controller AlphanumericCaptchaController.cs public class AlphanumericCaptchaController