How an editor shows them: Display
Display says how an editing interface, such as the Relatude CMS, shows the nodes a property holds.
It goes on [RelationProperty], [ReferenceProperty], [ReferencesProperty], [EmbeddedProperty]
and [EmbeddedMapProperty]:
using Relatude.DB.Datamodels.Properties; // DisplayMode
[RelationProperty(Display = DisplayMode.Table)]
EventsAtVenue.Events Events { get; }
[ReferencesProperty(Indexed = true, Display = DisplayMode.Cards)]
References<IOrganizer> Sponsors { get; }
[EmbeddedMapProperty(KeyProperty = nameof(OpeningHours.DayCode), Display = DisplayMode.Inline)]
EmbeddedMap<string, OpeningHours> Hours { get; }| Value | Shown as |
|---|---|
List |
a list of the nodes; the default |
Table |
rows with columns, paged |
Inline |
each node as its own form, opened in place |
Cards |
a card for each node |
Thumbnail |
the type's icon and the node's first picture |
Pills |
a pill with each node's name |
Dropdown |
a drop-down to choose nodes from; not for embedded nodes |
The store ignores Display, so changing it rebuilds nothing. An application reads it from the
property's model (RelationPropertyModel.Display and the like). The admin UI's datamodel editor can
change it; for a type from compiled code, the change is saved as an override in the database
(§3.1).