klxm / klxm_meta
Shared meta fields for REDAXO 6: alternative text per language and “decorative” for media – one place for all KLXM addons (fluid, tiptap, image_editor …)
Requires
- php: ^8.5
- redaxo/core: ^6.0@dev
Requires (Dev)
- phpunit/phpunit: ^12.5 || ^13.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-18 11:17:26 UTC
README
One place for the meta fields the KLXM addons share, so that no two addons define the same column. Starts with accessibility of images; open for more fields.
Media: alternative text and “decorative”
| Field | Column | Where |
|---|---|---|
| Alternative text (per language) | meta_alt in rex_media_translation |
images only |
| Decorative | meta_decorative in rex_media |
images only |
The fields appear in the media pool (REDAXO 6 meta schemas, created by php bin/console migrate). Other file types
(videos, PDFs …) don't show them.
One rule for all addons
use Klxm\Meta\Alt; Alt::attribute('photo.jpg'); // value for alt="…" – always a string Alt::attribute('photo.jpg', 'Own text'); // explicit text wins ('' = decorative) Alt::of('photo.jpg'); // '' decorative, null not maintained, otherwise the text Alt::isDecorative('photo.jpg');
- An explicit text (overridden in an editor or block) wins.
- Decorative images get
alt="". - Otherwise the alternative text in the language (default: current language).
- Without alternative text the title of the medium (
titleFallback: falseturns that off).
Used by fluid, tiptap and image_editor.
Note for projects
Meta fields in REDAXO 6 are MetaSchema classes; each column may belong to one schema only. A project that defines
meta_alt itself gets a collision message from migrate – use this addon's field instead.
License
MIT, KLXM Crossmedia GmbH