Views and prepared rendering
Homepage, archive, detail, taxonomy and 404 data.
Read the page contract
PublicSiteContext prepares site, theme, navigation, localization and capabilities. Public module controllers add their owning presentation data. Render these arrays directly and keep database queries, storage operations and domain orchestration out of views.
The detail contract supplies title, summary, sanitized body, featured_media, structured_fields, seo and locale. The canonical body arrives as an HtmlString; ordinary strings should remain escaped with Blade's normal output syntax.
<h1>{{ $title }}</h1>
@if($summary)<p>{{ $summary }}</p>@endif
<div class="prose">{{ $body }}</div>
This fragment belongs inside a complete layout that renders prepared SEO once. It is a rendering fragment, not a complete Theme.
Home and archives
The homepage receives a nullable homepage. Missing or unpublished configured Content is a normal fallback state. The root is a presentation alias and does not create a Content route. Use $site['home_url'] for the prepared locale-aware home link.
Archives receive archive_title, archive_description, a paginated items collection and seo. Each item includes its prepared url, title, excerpt and optional Media. Term archives use the same preparation plus Term context. Do not compose archive or detail paths in Blade.
The 404 contract supplies prepared localization, site context and a title. Keep the result navigable without accidentally making missing content look published.
Additive presenters
<?php
namespace Themes\Reference;
final class Labels implements \App\Core\Themes\ViewPresenter
{
public function present(string $view, array $data): array
{
return ['labels' => ['reading' => 'Read the guide']];
}
}
This is a syntactically validated contract illustration. A real package must register the class through its bootstrap and localize UI copy. Presenter output is additive; it does not replace the owning page data.
Read Content and fields before introducing specialized layouts.
Conceptual fragments: supply the required package files and register any presenter before use.