MetaData Configuration
Madek implements a configurable MetaData system that needs to be set up by administrators/editorial staff.
This configuration pertains the kind of MetaData that can be entered,
who can enter or see MetaData,
as well as how it is displayed in the webapp
,
as well as which MetaKeys are mandatory.
Note that because all of this configuration is dynamic, any changes to the could lead to editorial challenges. See "Validation" below.
NOTE: the default values for these settings might look weird. This is for historical reasons – to enable upgrades from version 2. Many of these settings where either implicit or even hardcoded, the default just match them and make them implicit. Feel free to just delete them and start fresh.
MetaData is organized in two ways: Vocabularies and Contexts.
Vocabularies
Every MetaDatum is necessarily a member of one Vocabulary.
There is one built-in Vocabulary, madek_core
, that
already contains default MetaKeys.
These are used and/or needed by the application and business logic
(like a "Title" for display or "Copyright" for legal purposes).
Additional Vocabularies with MetaKeys can be created as needed for every application instance. Their purpose is to group MetaKeys by subject, use case, external mapping, etc. and to allow to set permissions for viewing and editing of related MetaData.
Contexts
Contexts
allow to group MetaKeys for
display of MetaData in the webapp
as well as for the validation of required keys.
A MetaKey in a Context is called a ContextKey and has additional attributes
such as field label or input type.
NOTE: The "required" attribute of ContextKeys is only enforced by the
webapp
if the Context is configured for [validation][#validation].Setting the "required" attribute on ContextKeys that are not enforced by the
webapp
can still be useful for certain workflows:
Simple Example
Assuming that a Madek instance has the requirement that all MediaEntries have a valid title and are assigned to a specific institutional unit.
- Create a Vocabulary
institution
- Create a MetaKey
institution:unit
of typeKeywords
- Create a Context
required_fields
- Add MetaKeys
madek_core:title
andinstitution:unit
to this Context, set both torequired: true
- Configure AppSetting
contexts_for_validation
torequired_fields
Now Entries can not be published or changed later on if these declarations are missing.
To also show this data on the detail page in the webapp
:
- Create a Context
summary
- Add MetaKeys
madek_core:title
andinstitution:unit
to this Context - Configure AppSetting
context_for_show_summary
tosummary
AppSettings
It can be configured where to show which kind of MetaData,. Note that this makes it possible to hide certain data from the default interface. For this reason there is always an option to list all MetaData by Vocabulary, e.g. inside the "All Data" Tab of the Detail view.
Display
AppSettings: context_for_show_summary
AppSettings: contexts_for_show_extra
- up to 4 more Contexts to show on detail view
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Resource Detail View (ex. MediaEntry) ┃
╔═══════╩━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╩═══════╗
║ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ ║
║ Title (madek_core:title) ║
║ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ ║
║ ┌─────────────────────────┬──────────────────────────┐ ║
║ │ │ │ ║
║ │ │ ┌────────────────────┐ │ ║
║ │ ┌ ─ ─ ─ ─ ─ ─ ─ ┐ │ │ │ │ ║
║ │ context_for_ │ │ │ │ ║
║ │ │show_summary │ │ │ (media preview) │ │ ║
║ │ ─ ─ ─ ─ ─ ─ ─ ─ │ │ │ │ ║
║ │ │ └────────────────────┘ │ ║
║ │ │ │ ║
║ ├─────────────────────────┴──────────────────────────┤ ║
║ │ │ ║
║ │ │ ║
║ │ │ ║
║ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ │ ║
║ │ contexts_for_show_extra │ ║
║ │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ ║
║ │ │ ║
║ │ │ ║
║ └────────────────────────────────────────────────────┘ ║
╚════════════════════════════════════════════════════════╝
Indexes, "List View Mode"
AppSettings: contexts_for_list_details
- in the "List View Mode" of Resource Indexes additional MetaData is shown
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Resource Index, List View ┃
╔═══════╩━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╩═══════╗
║ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ║
║ ┣───────────────┬────────────────────────────────────┫ ║
║ ┃ ┌───────────┐ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ ┃ ║
║ ┃ │(thumbnail)│ │ contexts_for_list_details ┃ ║
║ ┃ └───────────┘ │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ ┃ ║
║ ┣───────────────┼────────────────────────────────────┫ ║
║ ┃ ┌───────────┐ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ ┃ ║
║ ┃ │(thumbnail)│ │ contexts_for_list_details ┃ ║
║ ┃ └───────────┘ │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ ┃ ║
║ ┣───────────────┼────────────────────────────────────┫ ║
║ ┃ ┌───────────┐ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ ┃ ║
║ ┃ │(thumbnail)│ │ contexts_for_list_details ┃ ║
║ ┃ └───────────┘ │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ ┃ ║
║ ┣───────────────┼────────────────────────────────────┫ ║
║ ┗━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ║
╚════════════════════════════════════════════════════════╝
Indexes, "Dynamic Filters"
AppSettings: contexts_for_dynamic_filters
- in Resource Indexes build DynamicFilters from theses Contexts
Note: For a consistent user experience this setting should match the
context_for_show_summary
/contexts_for_show_extra
contexts as closely as possible, in simple cases it can be the same contexts. However, this setting is separated so that resource expensive MetaKeys can be excluded from the DynamicFilters for performance reasons.
Validation
AppSettings: contexts_for_validation
One or more [Context]s can be configured as contexts_for_validation
.
This checks the required
setting of a ContextKey inside those Contexts
whenever MetaData is updated and ensures that a value is set.
Note: To set a ContextKey to be
required
does not immediately affect the existing MetaData! Rather, the validation will be enforced the next time it is edited.