Surendra Sharma

Surendra Sharma

Search This Blog

Wednesday, March 10, 2021

Sitecore Hackathon 2021 - CSV to YML Generator for JSS App

Happy to share that our SAM team participated in Sitecore Hackathon 2021 on Sat 6 Mar. We started our day at 6 AM and finished it around 10 PM.

Out of 4 different problem categories, we selected one of the category “Best use of Headless using JSS or .NET” as our problem statement.

We have developed CSV to YML Generator for JSS App. It works like a charm.

 

Architecture Diagram

CSV To YML Generator


Sharing below reference links for this module.

 

I deliberately skipping all module details here in the hope that you will watch the video 😉.

Love to hear your comment(s), feedback(s) or suggestion(s).

Result will be announced in upcoming weeks. Till that time - stay tuned.

Wednesday, December 2, 2020

1 Dec 2020 - Special day - 0.5 million

1st Dec 2020 was special day for my personal blog website where Total Page views crossed 0.5 million count.

I started to note down my learning notes since I started my carrier. One fine day in May 2010, these notes converted into this blog site. Since then my technical journey is still continuing ...

Thanks for each and everyone. I hope you got it what you are looking for at this place. 

Any suggestion or improvements are most welcome!!!


Million Page Views count


 

Friday, June 12, 2020

Redirect Sitecore Azure App service website from HTTP to HTTPS

One of my client Sitecore website https://www.example.com is running on Azure App service. As its running on HTTPS,so whenever users try to access website using HTTP protocol, then they get the error. So requirement is that how to redirect from http://www.example.com to https://www.example.com?

Solution:-
  • Login to Azure Portal
  • Open your Sitecore Azure App Service. Its name should be "mysitecoredev93-111111-single" or similar to this.
  • Under Custom Domain, turn ON "HTTPS Only" mode.

Http to Https


Once it is done, now your http://www.example.com should redirect to https://www.example.com.

I hope this quick tip help you in Sitecore Azure App service deployment.

Thursday, November 28, 2019

How to install Horizon with Sitecore 9.3


Horizon is the next-generation page editor with Sitecore 9.3. This article help you to install it on Sitecore 9.3. 


  • I downloaded it at path “D:\Sitecore 9.3. Unzip file "Sitecore Horizon 9.3.0.zip".

  • Open "parameters.ps1" file in notepad from path “D:\Sitecore 9.3\Sitecore Horizon 9.3.0”. Edit below parameter as 


$ContentManagementInstanceName = "sitecore93sc.dev.local"
$ContentManagementWebProtocol = "https"
$SitecoreIdentityServerPhysicalPath = "C:\inetpub\wwwroot\sitecore93identityserver.dev.local"
$SitecoreIdentityServerPoolName = "sitecore93identityserver.dev.local"
$SitecoreIdentityServerSiteName = "sitecore93identityserver.dev.local"
$LicensePath = "D:\Sitecore 9.3\license.xml"

Refer this mapping image for filling exact values.


Horizon Parameter values mapping
Horizon Parameter values mapping

  • Save this file.
  • Open Powershell in admin mode and run file "D:\Sitecore 9.3\Sitecore Horizon 9.3.0\install.ps1".
Note:-

If your "Install.ps1" script failed with error 

Install-SitecoreConfiguration : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again. 

You should open Internet Explorer and enabled "Use recommended security, privacy and compatibility settings" feature.
  • Once this script finished successfully, open Sitecore dashboard and you should get Horizon icon on dashboard as

Horizon in Sitecore Dashboard
Horizon in Sitecore Dashboard

  • When you click on it, you should redirect to site https://sitecore93sc.dev.localauthoringhostclient/. You can change this site name from "$authoringHostName" value in "parameters.ps1" file. Use same Sitecore credential to login and should get below screen with Home item selected

Horizon Editor
Horizon Editor

 Hurryyyy with Sitecore 9.3 we got something more advance page editor.

eBook : Processing User Interaction Data using Sitecore Universal Tracker

Sharing my new eBook with Sitecore community - "Processing User Interaction Data using Sitecore Universal Tracker".

You can read and download this ebook from here:



I hope you like this eBook.

Please leave your comments or share this eBook if it’s useful for you.
 

Friday, November 15, 2019

How to get Sitecore multilist items details in GraphQL

I have graphQL query for my JSS app as

{
  search(fieldsEqual: [{name: "_fullpath", value: "/sitecore/content/abc"}]
  , keyword: "") {
    results {
      items {
        item {
          ... on Brand {
            heading {
              value
            }
            questionList {
              value
            }
          }
        }
      }
    }
  }
}

Here "QuestionList" is a list field for which I am getting output with Item ids separated by pipe "|" as

"questionList": {
  "value": "{79BADBCE-3824-4664-B74C-D5D931154E86}|{2D0FCE78-8377-4A1E-B47B-A3BDBB6D8D62}"
}

But instead of this items ids, how to get multilist items details?

For this we must use "targetItems" cluase as

{
  search(fieldsEqual: [{name: "_fullpath", value: "/sitecore/content/abc"}
   ], keyword: "") {
    results {
      items {
        item {
          ... on Brand {
            heading {
              value
            }
            questionList {
              value
              name
              targetItems {
                id
                name
                ... on Question
                {
                  questionstatement {value}
                }
              }
            }
          }
        }
      }
    }
  }
}

As you can observe here we can use strongly type items "Question" inside of "targetItems". Its output is

{
  "data": {
    "search": {
      "results": {
        "items": [
          {
            "item": {
              "heading": {
                "value": "This is Heading"
              },
              "questionList": {
                "value": "{79BADBCE-3824-4664-B74C-D5D931154E86}|{2D0FCE78-8377-4A1E-B47B-A3BDBB6D8D62}",
                "name": "questionList",
                "targetItems": [
                  {
                    "id": "79BADBCE38244664B74CD5D931154E86",
                    "name": "Question 1",
                    "questionstatement": {
                      "value": "Question 1"
                    }
                  },
                  {
                    "id": "2D0FCE7883774A1EB47BA3BDBB6D8D62",
                    "name": "Question 2",
                    "questionstatement": {
                      "value": "Question 2"
                    }
                  }
                ]
              }
            }
          }
        ]
      }
    }
  }
}

I hope this trick helps you to write GraphQL queries in better way for Sitecore JSS app.