Surendra Sharma

Surendra Sharma

Search This Blog

Showing posts with label Sitecore. Show all posts
Showing posts with label Sitecore. Show all posts

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.