Contents
Where are the imported fields in Sitecore JSS?
By default, all the imported fields in a JSS app are placed in what Sitecore calls data sources. These are data items which are referenced in the layout of the route item. The route item itself does not contain any of its own fields by default. To add fields to an item, you need to do it on a data template.
How to get all language versions of Sitecore?
The script below returns a list with the names of languages which have versions for the item. 0.7298ms to get Version Counts with 8 language versions. Time to load item: 9.3041ms. Langs: es-ES, es-MX, sv-SE, en, it-IT, pt-BR, fr-FR, de-DE 0.0448ms to get Version Counts with 7 language versions.
How does development mode work in Sitecore JSS?
For route items, this means that any rendering changes or updates to datasource items are also skipped. Note that Development Mode includes an __OnSave command which moves the item into Content Mode. This means that by default, any content changes to an item will force it into Content Mode, to avoid overwrite by subsequent imports.
How do you add fields to an item in JSS?
To add fields to an item, you need to do it on a data template. JSS allows you to define fields for custom “route types” which will be imported as new data templates.
Where to find route data in Sitecore JSS?
The Placeholder component, and any components that it renders, expect route data to adhere to a specific schema – outlined in the Reference below. For disconnected development, route data is typically retrieved from static YAML or JSON files, or simple JavaScript files.
How is the manifest API used in Sitecore?
The manifest API is used to define the structure of your JSS site while it is disconnected, so that it can be later imported into Sitecore. Route data is used to represent the routes served by your app when running in disconnected mode.
Where do I put my custom templates in Sitecore?
Create a folder to store your template library. Move or copy your app template into the library folder. For example if your library is ~/jss-templates and the new template is called react-custom, the template would belong at ~/jss-templates/react-custom.
What happens when EE is not active in Sitecore?
When EE is not active, editable will contain the rendered field value – which may differ from the “raw” field value for certain field types (e.g. Image, Rich Text, Link) or if the renderField pipeline has been extended / customized. There are times when your components will need to receive values that aren’t stored as fields on a data source item.
Which is the default route template in Sitecore?
Note for Sitecore devs and admins: The JSS import process will always generate a route template for each app. This template is the default route template, but is also automatically set as a base template for any route types defined in the app manifest.