MARS Developer ReferenceBuild against the current Theme contract.

Media and Navigation

Prepared public URLs, stable targets and optional imagery.

Render prepared Media

Media owns upload validation, paths, variants and attachments. Public consumers use UUIDs and prepared URLs. A featured image may be absent. Prefer the prepared web variant for a content image and reserve its intrinsic dimensions.

@if($featured_media)
<img src="{{ $featured_media['variants']['web']['url'] ?? $featured_media['url'] }}"
     alt="{{ $featured_media['display_alt'] ?? '' }}"
     width="{{ $featured_media['variants']['web']['width'] ?? $featured_media['width'] }}"
     height="{{ $featured_media['variants']['web']['height'] ?? $featured_media['height'] }}">
@endif

Use meaningful translated alt text from Media. Keep decorative images empty-alt when appropriate. Lazy-load images below the first viewport; do not lazily delay the critical hero image. Current GD processing supplies WebP variants. AVIF is an optional future tooling choice, not a current guarantee.

Declare locations in the manifest and render the prepared navigation arrays for those locations. Each item has a translated label, prepared URL, active flag and child items. The Navigation module resolves stable Content targets through current routing.

<nav aria-label="Primary">
<ul>
@foreach($navigation['header'] ?? [] as $item)
<li><a href="{{ $item['url'] }}"
       @if($item['active'] ?? false) aria-current="page" @endif>
    {{ $item['label'] }}
</a></li>
@endforeach
</ul>
</nav>

This compact example demonstrates one level. A complete Theme should recursively render children and localize the region label. Menus may be unassigned; a useful shell must remain coherent.

Assignments are per Theme and location. Switching preserves them, rather than transferring or deleting one Theme's editorial choices. Read localization before adding language links.