Relatude Help

The content tree

The CMS interface's content tree is the page tree RTree, or the relation that the CMS setting Content.Tree names. These methods work on it as the interface does. Each also takes a relation, to work on another tree.

Method Does
tree({ parent?, search?, root? }) { relation, items }: a parent's children, the top of the tree, or the nodes whose names match
treePath(id) the ids from the top of the tree down to the node's parent
treeCreate({ type, name?, parent?, after?, values? }) makes a node in the tree, with an address made from its name: { id }
treeMove(drop), treeCopy(drop) moves or copies nodes, with their children unless children is false; a copy runs as a process
treeCount({ id?, ids?, children? }) how many nodes a copy would make or a delete would remove: { nodes, warnAt }
treeCountBelow({ ids }) counts everything below each node, as a process
treeDelete({ ids, children? }) deletes nodes, with their children unless children is false: { deleted }, or { process } for a large delete

A TreeDrop is { id, ids?, parent?, before?, after?, children? }. The nodes go into parent as its last children, next to the sibling that before or after names, or to the top. In a tree of sites, tree shows the site that root names, and also returns the sites the user can read.