Monday, August 23, 2021

Sitecore Best Practices (V10.1) 009 - Scriban best practices

I think we need to make sure to add the proper object null handling while using the scriban, as an example below.


{{ if  i_item.propertyname != "" }}

{{ end }}

or, in case if you are using the custom Scriban extension or trying to read the object property

{{ if object!= null }}

or 

{{ if object }} 


Add the proper formatting for the scriban scripts so it is easy to read 



Sitecore Best Practices (V10.1) 008 - Apply Sitecore patches and fixes.

It's always good to apply the Sitecore patch in the correct way so this can be easily tracked(identified) that what all fixes/patches applied.

Although Sitecore has a good practice to include the patch (.txt) file in the Sitecore-->shell folder so we can see all the applied patches.

I usually prefer to apply the patch with the below approach.

1. Create the hotfix folder in the solution root. example src-->hotfixes--> here I would prefer to create the categories like if the fix is related to Sitecore core, SXA forms etc, so create the folder accordingly.

2. For the search folder(feature) as mentioned in point #1, create a separate solution under the project.


Example -