Query the site context
Version: 0.4
Before you begin
-
Complete the SDK quick start.
In the quick start, you make your first query by running
client.query("application.context").
In the SitecoreAI dashboard widget extension point, you can query the site context to retrieve details about the current site.
To query the site context:
-
In the SDK initialization code where you run the
useMarketplaceClienthook, in the Effect Hook, after the"application.context"query, create a new query, then save your changes: -
In a SitecoreAI site dashboard, open your web browser's console, refresh the page, then open your Marketplace app.
-
In the console, find the log for
Success retrieving site.contextand inspect the object. The object contains all the details about the current site.