MARS Developer ReferenceBuild against the current Theme contract.

Content, taxonomy and structured fields

Consume semantic facts without making demo data a dependency.

Content belongs to its module

A Theme does not require its demonstration pack. Content Types use immutable semantic keys. A Theme may adapt a composition to a prepared content_type_key; it must still work when optional records or fields are absent.

All create, update, publish, assignment and revision restore operations go through Content application services. ContentRouter owns detail paths and route history. ContentArchiveRouter owns Content Type and Term archive paths. Taxonomy remains part of Content.

Structured fields in the view

Prepared structured_fields contain key, translated label, type and a resolved value. Optional blank values are omitted. Media fields are already presented through Media. A Theme should not look up database identities or read filesystem paths.

@if($structured_fields)
<dl>
@foreach($structured_fields as $field)
    @if($field['type'] === 'text')
    <dt>{{ $field['label'] }}</dt>
    <dd>{{ $field['value'] }}</dd>
    @endif
@endforeach
</dl>
@endif

This fragment renders text fields only. It does not promise a universal display component for every field type. Validate genuinely required semantic fields in their owning Content workflow, not during Theme activation.

Canonical body HTML

The server's ContentBodySanitizer is authoritative. The sanitizer retains inert code blocks, technical tables and constrained heading anchors so documentation can use normal Content. Unsafe scripts and event attributes remain excluded. Themes must not bypass sanitization to preserve a preferred visual effect.

Revisions are append-only snapshots owned by Content. Restoring a revision runs through the same Content and routing services. Theme switching never creates a revision or rewrites a translation.

See Media and Navigation for other prepared contracts.