You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/data/routes/docs/client-frameworks/angular/sample-app/en.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -199,7 +199,7 @@ There are several mechanisms of using/outputting translated values with `ngx-tra
199
199
200
200
#### `JssTranslationLoaderService`
201
201
202
-
This implementation loads the Sitecore dictionary from the Dictionary Service provided by JSS, found at `/sitecore/api/jss/dictionary/`, using `HttpClient`. It is used as a "fallback" during both client and server rendering.
202
+
This implementation loads the Sitecore dictionary from the Dictionary Service provided by JSS, found at `/sitecore/api/jss/dictionary/`, using `RestDictionaryService`. It is used as a "fallback" during both client and server rendering.
Copy file name to clipboardexpand all lines: docs/data/routes/docs/fundamentals/services/layout-service/en.md
+24-29
Original file line number
Diff line number
Diff line change
@@ -97,38 +97,33 @@ If you don't want analytics tracking for your JSS app, or for particular Layout
97
97
98
98
## Invoking the Layout Service from JSS
99
99
100
-
The Sitecore JSS SDK provides a simple API to make utilizing the Layout Service easier. Enter your configuration into the `fetchOptions` object and pass it into `dataApi.fetchRouteData()`. The `fetcher` option enables you to implement whichever data access method you wish. JSS ships with axios, which can be imported from `src\dataFetcher.js`.
100
+
The Sitecore JSS SDK provides a simple API to make utilizing the Layout Service easier. Create instance of `RestLayoutService` and pass your configuration into the constructor and call `layoutService.fetchLayoutData()`. The optional `dataFetcherResolver` option enables you to implement whichever data access method you wish. JSS ships with Axios by default.
101
101
102
-
The `dataApi` object is found in the `@sitecore-jss\sitecore-jss` package but is also exposed via the framework-specific SDKs
102
+
The `RestLayoutService` class is found in the `@sitecore-jss\sitecore-jss` package but is also exposed via the framework-specific SDKs
103
103
104
104
```javascript
105
-
import { dataApi } from '@sitecore-jss/sitecore-jss-react';
Copy file name to clipboardexpand all lines: docs/data/routes/docs/fundamentals/services/tracking/en.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ The tracking API ships with TypeScript typings, so with TS-aware editors like VS
72
72
73
73
The tracking API supports tracking arbitrary page view events. This can be useful for things like tracking route changes that do not involve a Layout Service request (cached, custom routes, etc). When tracking page views, it's important to know:
74
74
75
-
* Requests to [Layout Service](/docs/fundamentals/services/layout-service) will track a page view by default. This can be disabled by adding `tracking=false` to the Layout Service request query string (configurable via the `dataApi` object in JSS apps). Disabling LS tracking may make sense if all page tracking is to be handled using the tracking API.
75
+
* Requests to [Layout Service](/docs/fundamentals/services/layout-service) will track a page view by default. This can be disabled by adding `tracking=false` to the Layout Service request query string (configurable via the `RestLayoutService` class in JSS apps). Disabling LS tracking may make sense if all page tracking is to be handled using the tracking API.
76
76
* Page view events require a Sitecore Item ID to track against, even though the URL tracked is arbitrary. If tracking non-item-based routes, you may need to create surrogate items to track against.
Copy file name to clipboardexpand all lines: docs/data/routes/docs/techniques/extending-layout-service/extending-layout-service-overview/en.md
+10-1
Original file line number
Diff line number
Diff line change
@@ -180,4 +180,13 @@ After patching in your custom configuration, you can utilize it in your JSS App
180
180
</javaScriptServices>
181
181
```
182
182
183
-
You'll need to ensure that you provide this configuration name in your client code as well when invoking Layout Service via the `dataApi` (see examples above).
183
+
Provide configuration name in your client code as well when invoking Layout Service via the `RestLayoutService`.
Copy file name to clipboardexpand all lines: docs/data/routes/help/en.md
-15
Original file line number
Diff line number
Diff line change
@@ -135,21 +135,6 @@ Attempt to connect to Node timed out after 60000ms.
135
135
136
136
* Placeholders defined in JSS will use the global `key` field on their Placeholder Settings. This means that conflicts may arise if non-JSS and JSS apps use the same placeholder key on a multi-site Sitecore installation. This is not a JSS-specific issue, and to avoid it give JSS apps unique placeholder names such as `myapp-main`. Note that JSS apps will _not_ conflict with each other when using the same placeholder keys, if there are multiple JSS sites.
137
137
138
-
* Site detection that is not based on `hostName` but on `virtualFolder` / `physicalFolder` attributes requires additional configuration and query string based site name specification. Search your app for `dataApi`, and find where the dataApi's `fetchRouteData()` function is being called. Add `sc_site` to the options passed to `fetchRouteData` like so:
139
-
140
-
```
141
-
const fetchOptions = {
142
-
// ...
143
-
querystringParams: {
144
-
// ... (i.e. 'sc_lang')
145
-
sc_site: 'name of your site definition in Sitecore'
0 commit comments