klxm / meta_extras
Extras for the MetaInfo of REDAXO 6: alternative text per language and “decorative” for media, shared by addons such as tiptap, image_editor and fluid
Requires
- php: ^8.5
- redaxo/core: ^6.0@dev
Requires (Dev)
- phpunit/phpunit: ^12.5 || ^13.1
Suggests
None
Provides
None
Conflicts
None
Replaces
- klxm/klxm_meta: 1.0.0-beta.2
This package is auto-updated.
Last update: 2026-11-29 16:15:26 UTC
README
One place for meta fields that several addons share, so that no two addons define the same column. Starts with accessibility of images; more functions will follow.
Compatible with fluid, editing right on the website for REDAXO 6. meta_extras works without fluid too. With fluid plus it is built in: the alternative texts are used for every image of the elements.
Formerly klxm/klxm_meta. The package replaces it (replace in composer.json); the columns and their data stay the
same.
Screenshot
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
