- Get link
- X
- Other Apps
Posted by
Sudheer Kumar Suggu
on
- Get link
- X
- Other Apps
In my previous blog,I have explained about the following topics. Please refer those before going through this blog.
- Part - 1: Getting Started with Sitecore Content Serialization using CLI
- Part - 2: Sitecore CLI Setup and Installation
Now in this blog, we will go through how we will create Sitecore module.json file and updates to Sitecore.json files.
Sitecore Module File
- For every project need to have a *.master.module.json and *.core.module.json files based on the need of the project.
- This module.json file contains the required items that need to be part of serialization and the yml files will present under the items folder based on the master and core db files.
- The Sitecore Content Serialization (SCS) system uses a set of properties to determine what and how content items in a Sitecore instance are influenced by the serialization commands.
- Sample module.json file for Master db Items
- Sample module.json file for Core db Items
- Refer below for definition of each property in the json file
- Refer below for scope property helps to determine the node scope for serialization of the content.
- In the context of module.json, you have the option to serialize roles. This can be achieved by including a roles property. This property is an array containing role predicate items, each defined by two properties:
- Domain - Representing the sitecore role domain
- Pattern - A regular expression that specifies which roles fall within the given domain
Sample File for Roles |
Changes to Sitecore.json file
Following changes need to be done to the sitecore.json file.
- Modules - Provide module.json path either wildcard path or can provide specific path to the module.json files in helix solution.
- Plugins - Displays list of installed plugins for CLI
- defaultMaxRelativeItemPathLength - This parameter to mention about the length of path of serialize items.
- defaultModuleRelativeSerializationPath - Folder name where serialize items will store, recommended folder name should be serialization for this version otherwise roles serialization doesn't work and rest will work.
In my next blog, we can look at some of the useful Sitecore CLI commands while working with Serialization.
Comments
Post a Comment
Please do not enter any spam link in the comment box