Skip to main content

Preset

Bundles of views and roles assigned to a resource: assigning, versions, and how presets and displays combine.

What a preset is​

A preset is a named bundle of views and roles for a kind of page: "the layout for a project space", "what an event page needs". Assigning a preset to a space or resource attaches all of its views at once, and makes its roles available there, instead of one display and one role attachment at a time. A preset is defined once and assigned to as many pages as fit it.

A preset names the page types it is meant for, its views — some marked as top-level, shown even where the page has no other content — and its roles.

Nanopublication · Open in Nanodash

Assigning and removing​

A preset is assigned to one resource by a nanopublication that names the preset and the resource; admins and maintainers do this for a space and its resources. It is removed by a later nanopublication naming the same pair as deactivated, whoever published the first. The newest wins.

What identifies an assignment is the preset together with the resource, not the particular preset version it names. Assigning a newer version of the same preset therefore replaces the earlier assignment rather than adding a second one.

Nanopublication · Open in Nanodash

Versions of a preset​

A preset has versions the way a view has: the preset stays the same, and each preset version names it with dct:isVersionOf. Assignments do not follow new versions on their own: an assignment pins the preset version it named, and moving to a newer one is a deliberate act — the About tab of a page shows when a newer version of an assigned preset exists, published by the same person as the assigned one, and offers to update.

Nanopublication · Open in Nanodash

Presets and displays together​

Views brought by a preset and views attached by individual displays share one pool per page, resolved by time: a display published after the preset assignment can switch off or adjust one of the preset's views for that page, and a preset assigned later can override earlier displays. A preset thus gives a page its baseline, and displays fine-tune it.

Nanopublication · Open in Nanodash

This page is a copy of the topic Preset of the Nanopublication Docs. Each paragraph is a nanopublication. In Nanodash you also find their examples, related paragraphs, and version history, and members of the nanopub space can edit them there.