Search by

alveby / atrium-blocks

xiregroup

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

Package info

github.com/AlveBy/atrium-blocks

Homepage

Issues

Type:atrium-module

pkg:composer/alveby/atrium-blocks

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

v0.5.0 2026-12-03 17:18 UTC

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