alveby / atrium-blocks
Shared snippets for Atrium: a phone number, an address, a banner text written once and shown wherever it is put, in a template or inside any text
Requires
- php: ^8.3
- alveby/atrium: ^0.5
- illuminate/support: ^13.0
Requires (Dev)
- alveby/atrium-forms: ^0.5
- orchestra/testbench: ^11.0
- phpunit/phpunit: ^12.5
Suggests
- alveby/atrium-forms: A form can be put inside a block
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-12-04 07:54:45 UTC
README
Shared snippets for Atrium: a phone number, an address or a banner text written once and shown wherever it is put, in a template with @block('phone') or inside any text with the editor's + button. Per content language and per site, cached and refreshed on save.
Install
composer require alveby/atrium-blocks php artisan atrium:module:install alveby/atrium-blocks
atrium:module:install creates the table and turns the module on; atrium:module:remove alveby/atrium-blocks turns it off and asks whether to keep the snippets.
Shared snippets appears in the admin menu: name, code (what a template asks for), content (a ContentField, per language) and active.
Use
<a href="tel:+100">@block('phone')</a> {!! atrium_block('footer-note') !!}
In a text, + → Shared snippet → pick one. Not to be confused with the blocks of the page editor: a snippet is one text shown in many places. Up to and including 0.5.0, the module was called "Blocks"; only the name changed. See docs/blocks.md and docs/embeds.md.
Tests
From the repository root:
vendor/bin/phpunit packages/blocks/tests
Contributing
This package lives in packages/blocks of AlveBy/atrium. Issues and pull requests go there.
License
MIT