Sites
One database can hold several sites. A site is a Relatude.DB collection (ISystemCollection, which
the CMS's ISite is). A node is in one site or none, the same for all its revisions. Shared content,
such as templates, is in none. Reads are never limited to a site.
- A node read says its site in
$collection.update-metawithcollectionIdmoves the node to another site, or with null to none. - A site names the languages its content is written in (its
Cultures); one that names none takes any.siteslists them, andadd-culturewithsiteadds one. - The context's
collectionis the site the user works in.insertandtree-createput new nodes in it, and a new site goes in itself.
The store does not tie a node's languages to its site: that is the CMS interface's rule for new
content. A node moved or copied in the tree keeps its site, so a page can sit in one site's tree but
belong to another site, or to none. Two maintenance tasks put such content right. Administrators run
them under Maintenance in the CMS interface, or with maintenance-run. Check reports what is
wrong, and Fix also repairs it.
| Task | Does |
|---|---|
site-collections, Ensure matching system collection and site |
puts every node of a site's tree in that site, and each site in itself |
neutral-culture, Add a language to neutral content |
moves every node of the chosen site whose versions are all neutral into the chosen language, drafts and archived versions too |
neutral-culture works on the nodes in the site, so run site-collections first when the site's
tree holds nodes from elsewhere. Afterwards a reader of no language, such as a visitor at an address
that names none, no longer finds what was moved, so the site has to read in that language or fall
back to it. The task warns about this before it fixes.