Posts

Sitecore 10 installed by SIA

Image
Sitecore 10 is out with new feature and cool enhancement so let's try to install and explore new updated with 10x. As usual just go to Sitecore download portal and download it. https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform/100/Sitecore_Experience_Platform_100.aspx Note: There is no need to install any prerequisites! Installation:  Once downloading finish then extract files and click on setup files. Click on Start Button,   Install the prerequisites to make sure the version should be up to date! Install the Solr 8.4.0 and update Solr port/window service and path prefix to avoid conflict with previous installed version. click install and move on next screen. In Sitecore setting we need to update solution prefix/password and license file and click next button. In Sql server setting screen just put Server instance name/ user name and password and click next button. In order to verify Solr setting and click on next button  This is optional module for SXA if you want t

Sitecore forms cool feature

Image
Sitecore continue to add great new feature to forms some that what we expect earlier, I just explore the Sitecore 9.3 forms and found lot of cool feature so i listed down some point. a. Create a Multi page form:      This is cool feature to create multiple page in one form and you can manage by forms by       conditions. b. Publishing and Delete data within form module directly     In forms we can save and publish it directly and also we can delete the forms data just select the form and do the operation directly. d. Email confirmation field     In forms you just drag&drop email confirmation field and see the magic! e. Boat detection:       Robo! we can use the bot detection functionality to verify the visitor is human so we don't need       captcha here, Awesome work by Sitecore team! f. Redirect to external URL:   If the requirement comes to redirect external URL then you can use by default feature to do some        setting, just click

Add Custom Validation in Sitecore 9.3 Forms

Image
A quick walk through to add custom validation in Siteccore forms! Well In Sitecore forms we can add validation as per our business requirement So quickly gone through that logic part! So firstly we need to create CustomValidation  class in our solution and inherit by  ValidationElement and make sure you added reference with Sitecore.ExperienceForms.Mvc.dll  So for example we are restrict to user to only small letter in our text box so you need to give pattern  as per need, In bold line you can see the pattern as per need can be change! below code is to override validation forms.   public class CustomValidation : ValidationElement<string>     {         private const string NamePattern = "^[a-z]*$";         public CustomValidation(ValidationDataModel validationItem) : base(validationItem)         {         }         public override IEnumerable<ModelClientValidationRule> ClientValidationRules         {             get             {              

Add Custom Save Button in Sitecore 9.3 Forms

Image
In Sitecore Forms we can easily add custom save button to manipulate forms data, Well i had a requirement to capture some data from forms and insert it under custom database.  So its allow to override this one! let's start to create logic for capture data! Just create a MVC solution and add refrence Sitecore.Kernel, Sitecore.Mvc and Sitecore.ExperienceForms.dll after that just create a class and inherit  by SubmitActionBase.  you need to add some more references in your class. using Sitecore.Diagnostics; using Sitecore.ExperienceForms.Models; using Sitecore.ExperienceForms.Processing.Actions; using Sitecore.ExperienceForms.Processing; Below code you need to add under your class to execute your custom button.  public forms(ISubmitActionData submitActionData) : base(submitActionData)         {         }         public override void ExecuteAction(FormSubmitContext formSubmitContext, string parameters)         {             Assert.ArgumentNot

How to find broken links in Sitecore.

Image
Well, recently i take it clone of website and found too much broken links so i want to listed all broken links and fix it one by one. I search about that and read so many articles so i found a easiest way to identify broken link. a. First one we can go directly on control panel under reports > Scan the data for broken links. just click on that and it will open a new popup window. choose data base and press scan button it will take few seconds or minutes as per database and will show you a list of broken links. for fix it just click on item and fix it. b. Second way i found by power shell. just go on launchpad and click on PowerShell ISE. it will open a new popup looks like below images. just copy below script and paste there and press execute button. it will take few seconds to generate broken list. #Script Copied.. $database = "master" $root = Get-Item -Path (@{ $true = " $( $database ) :\content" ;

What is Glass.Mapper and how to Configure it

Image
What is Glass Mapper? Glass Mapper is a Sitecore ORM (Object Relation Mapping) created by Sitecore MVP Mike Edwards. An ORM maps data to the objects in your code. Glass Mapper is a powerful object relation mapping framework that models Sitecore objects to strongly-typed classes. Among other things it removes the necessity of mapping code to your data store, manual code mapping and item querying in your view logic. and its allows you to map data from Sitecore Database directly into strongly typed C# models. Glass mapper very famous ORM in Sitecore Community. WHY? In Simple way we can say its automatically map the data Sitecore items to C# models. Developers don’t need to write too many code to get data. Here some advantage about that. a. Map all basic attributes of a Sitecore Items b. Supports experience editor c. Make your code unit testable d. Large community to support e. Strongly typed classes For Comatability With Sitecore version Yo