-
Notifications
You must be signed in to change notification settings - Fork 0
Field Types
Marble includes 17 built-in field types. Each is configured per blueprint field.
Single-line text input.
{{ $item->value('title') }}Multi-line plain text (textarea).
{{ $item->value('summary') }}
{{-- Preserve line breaks: --}}
{!! nl2br(e($item->value('summary'))) !!}WYSIWYG rich text editor (CKEditor). Stores HTML.
{!! $item->value('content') !!}Configuration options:
-
toolbar— Toolbar preset:'full','basic'
Supports internal node-link placeholders ({% node-link:42 %}) which are automatically resolved to item URLs when rendered.
Not available in contact forms.
Dropdown select list.
{{ $item->value('category') }}Configuration options:
-
options— Array of{ key, value }pairs -
multiple—trueto allow multiple selections (returns array)
Boolean toggle. Stores '1' (checked) or '0' (unchecked).
@if($item->value('featured'))
<span class="badge">Featured</span>
@endifDate picker. Returns YYYY-MM-DD.
{{ \Carbon\Carbon::parse($item->value('publish_date'))->format('d.m.Y') }}Returns a structured array: ['date' => '...', 'time' => '...'].
Returns a structured array: ['hour' => '...', 'minute' => '...'].
Single image with media library picker, focal point and transformations.
@php $img = $item->value('cover_image'); @endphp
@if($img)
<img src="{{ $img->url(800, 600) }}" alt="{{ $item->name() }}">
@endifURL sizing:
$img->url() // Original
$img->url(800) // Width 800, proportional height
$img->url(800, 600) // Cover crop to 800×600
$img->url(0, 400) // Height 400, proportional widthMultiple images with drag-to-reorder.
@foreach($item->value('gallery') as $img)
<img src="{{ $img->url(400, 300) }}" alt="">
@endforeachSingle file upload. Returns ['url', 'original_filename', 'size', 'mime_type'].
Configuration options:
-
allowed_filetypes— Comma-separated extensions (e.g.pdf,docx)
Multiple file uploads with reordering.
Configuration options:
-
allowed_filetypes— Comma-separated extensions
Reference to a single other item. Returns the full Item object.
@php $author = $item->value('author'); @endphp
@if($author)
<a href="{{ Marble::url($author) }}">{{ $author->name() }}</a>
@endifConfiguration options:
-
on_delete—'detach'or'cascade'
References to multiple items. Returns an array of Item objects.
Configuration options:
-
on_delete—'detach'or'cascade'
Repeating group of sub-fields. Returns an array of associative arrays.
@foreach($item->value('features') as $feature)
<h3>{{ $feature['title'] ?? '' }}</h3>
<p>{{ $feature['description'] ?? '' }}</p>
@endforeachFlexible key-value pairs. Returns a stdClass object.
@foreach((array)$item->value('metadata') as $key => $value)
<dt>{{ $key }}</dt><dd>{{ $value }}</dd>
@endforeachFields marked ✓ can be used in blueprints with Is Form enabled:
| Field Type | In Forms |
|---|---|
| textfield | ✓ |
| textblock | ✓ |
| htmlblock | — |
| selectbox | ✓ |
| checkbox | ✓ |
| date | ✓ |
| datetime | ✓ |
| time | ✓ |
| image | ✓ |
| file | ✓ |
| object_relation | — |
| object_relation_list | — |
| repeater | — |
| keyvalue_store | — |