Relatude Help

Address uniqueness

WillAddressResultInUniqueUrl(node, address) says whether an address gives a unique URL; ask it in an editor before saving. The store asks the same when it commits. If the answer is no, it adds a number to the address (info-2, then higher numbers) until the URL is unique, and writes that address on the node. A collision is never an error.

To address many nodes at once, such as a copied branch, use SetAddresses. It checks them in one transaction, far faster than one write each, when parents come before their children:

var td = new TransactionData();
// (node, address, keep the address in step with the name: null leaves it as it is)
td.SetAddresses(branch.Select(n => (n.Id, (string?)n.Slug, (bool?)null)));   // top first
db.Execute(td);