Skip to content

Sites and Site Groups

Ian DeRanieri edited this page Feb 9, 2018 · 6 revisions

Site Groups

Like field groups, Site Groups are used to organize different Sites into logical groups that make sense for the website. These should be listed before the sites object.

The siteGroups object accepts an array of the Name of the Site Groups you want to create.

"siteGroups": [

  ],
Attribute Accepts Notes
{Array of Site Group names} Exists This Site Group will be created.

Sites

Each Sites object will create a Site within the multi-site configuration.

"sites": [
  {
    "group": "",
    "name": "",
    "handle": "",
    "language": "",
    "primary": false,
    "hasUrls": true,
    "baseUrl": "@web/"
  }
]
Attribute Accepts Notes
group String This Site Group that this Site will belong to.
name String The name of this Site.
handle String The handle of this Site. Usually the camelCased version of the name, but not required.
primary Boolean Is this the primary Site for this Craft install?
hasUrls Boolean Does this Site have it's own urls?
baseUrl String This is the base url that allows the system to invoke this Site. Prepend @web/ to use the system baseUrl in front of the Site baseUrl.