Skip to content

Blueprints

Phillip Dornauer edited this page Apr 1, 2026 · 1 revision

Blueprints

A Blueprint defines a content type — it specifies which fields an item has, how it behaves, and what it can contain.

Creating a Blueprint

Go to Blueprints in the admin sidebar and click New Blueprint. Alternatively, use the interactive generator:

docker compose exec app php artisan marble:make-blueprint

Blueprint Options

Basic Settings

Option Description
Name Display name shown in the admin
Identifier Unique snake_case slug (e.g. blog_post). Used to find the Blade template (marble-pages/blog_post.blade.php) and in API calls. Cannot be changed after items exist.
Icon Icon shown in the tree and item listings
Group Organizes blueprints in the sidebar

Tree Behaviour

Option Description
Allow children Whether items of this blueprint can have children in the tree
List children Whether children are listed in the admin item view
Show in tree Whether items appear in the tree sidebar navigation

Content Features

Option Description
Versionable Enable full revision history for items of this type
Schedulable Enable Publish at and Expires at date fields
Workflow Assign a multi-step editorial workflow

Form Settings

Option Description
Is Form Makes this blueprint a contact form. Submissions are stored and can be viewed in the admin.
Form Recipients Comma-separated email addresses to notify on submission
Form Success Message Message shown to the visitor after successful submission
Form Success Item Redirect to a specific content item after submission (optional)

API Settings

Option Description
API Public Expose this blueprint's items via the REST API without requiring an API token

Blueprint Fields

Each blueprint has an ordered list of fields. For each field you define:

Setting Description
Name Label shown in the editor
Identifier Snake_case key used to retrieve the value in templates (e.g. hero_title)
Field Type Which input type to use — see Field Types
Translatable If enabled, the field has a separate value per language
Group Visual grouping inside the editor form
Sort Order Display order
Validation Rules Laravel validation rules (e.g. `required
Configuration Field-type specific options (e.g. dropdown options for a select field)

Accessing Values in Templates

{{ $item->name() }}                    {{-- Item name (built-in) --}}
{{ $item->value('hero_title') }}       {{-- Field value in current language --}}
{{ $item->value('content', 'de') }}    {{-- Field value in German --}}
{!! $item->value('rich_content') !!}   {{-- HTML field — use {!! !!} to avoid escaping --}}

Allowed Children

You can restrict which blueprints are allowed as children of a given blueprint. Configure this in the blueprint editor under Allowed child blueprints. Leave empty to allow all, or select specific blueprints.

Blueprint Inheritance

A blueprint can inherit from a parent blueprint. It gets all of the parent's fields automatically. Child fields with the same identifier override the inherited version.

The identifier and Blade Templates

Marble resolves a content item's URL and renders the Blade view whose filename matches the blueprint identifier:

resources/views/marble-pages/{identifier}.blade.php

If no matching view exists, Marble falls back to:

  1. resources/views/marble-pages/default.blade.php
  2. The built-in package fallback view

Clone this wiki locally