1. Sitecore Module Explorer

Configure module globs

Version:

The search paths used to locate your modules are called module globs. You must configure the module globs for Sitecore Content Serialization to find them. Typically, a solution has a file system structure like the following:


├───.sitecore
└───src/
    ├───BasicCompanyBuild/
    ├───BasicCompanyItems/
    │   └───BasicCompanyItems.module.json
    │   └───serialization/
    ├───Feature/
    │   └───BasicCompany/
    │       ├───Accordion
    │       ├───HeroBanner
    │       ├───PromoCard
    │       ├───PromoContainer
    │       └───SectionHeader
    ├───Foundation/
    │   └───Navigation
    ├───ProjectItems/
    │   └───ProjectItems.module.json
    │   └───serialization/
    └───Sitecore.RenderingHost.Helpers/

To configure module globs:

  1. In Sitecore Module Explorer, double-click Sitecore Configuration Root.

    Illustration showing the Sitecore Configuration Root form.
  2. In the Sitecore Configuration Root window, edit the following:

    FieldContent
    Default max relative item path lengthConfigure the maximum relative item path length allowed in the file system.
    Relative serialization pathConfigure the relative serialization path for items in all modules.
    Module GlobsAdd the paths to your modules. You can use wildcards for this. For example, to tell SCS that you keep *.module.json files located in /src subfolders, add src/*/*.module.json. Or, if you want to keep module files in the src/Feature/BasicCompany/Accordion/ subfolder, add src/*/*/*/*.module.json.
  3. Save the Sitecore Configuration Root.

If you have suggestions for improving this article, let us know!