think-digital-agency / contao-grid-plugin
Contao Grid Plugin — lightweight multi-breakpoint grid for Contao content elements. Adds column/offset settings to every content element and a grid wrapper start/stop pair, emitting Bootstrap-style col-* / offset-* classes. No MultiColumnWizard dependency, no framework picker. Contao 5 and 6.
Package info
github.com/think-digital-agency/contao-grid-plugin
Type:contao-bundle
pkg:composer/think-digital-agency/contao-grid-plugin
Requires
- php: ^8.2
- contao/core-bundle: ^5.3 || ^6.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
[English] A lightweight multi-breakpoint grid for Contao content elements.
Adds column and offset settings (xs–xl) to every content element and a grid
wrapper start / stop pair, emitting Bootstrap-style col-* / offset-*
classes. No MultiColumnWizard dependency, no framework picker — just one grid.
Contao 5 and 6.
composer require think-digital-agency/contao-grid-plugin
Ein schlankes Breakpoint-Grid für Contao-Inhaltselemente. Jedes Element
bekommt Spalten- und Offset-Einstellungen (xs–xl), dazu ein Wrapper-Paar
(Start/Stop) für Grid-Zeilen. Ausgabe: col-* / offset-* (Bootstrap-Stil).
Funktionsweise
- Spalten-/Offset-Einstellungen — zwei Felder (
gridSettingsWizard, je fünf Breakpoint-Selects) werden in jede Inhaltselement-Palette mitcssIDeingehängt. Gespeichert im Felddma_simplegrid_columnsettings/dma_simplegrid_offsetsettings. simple_grid_classes()— Twig-Funktion, liefert die Grid-Klassen der aktuellen Zeile (context.data).parseTemplate-Hook — hängt dieselben Klassen an$template->class, für Legacy-Templates die das flacheclasslesen.- Wrapper
dma_simplegrid_wrapper_start/_stop— Fragment-Controller, über$GLOBALS['TL_WRAPPERS']als Start/Stop-Paar registriert.
Grid-Konfiguration
Ein festes Grid (GridConfig), Bootstrap-Stil:
| Breakpoint | Spalte | Offset |
|---|---|---|
| xs | col-N |
offset-N |
| sm/md/lg/xl | col-{bp}-N |
offset-{bp}-N |
Spaltenwert hide → d-{bp}-none, Offsetwert reset → offset[-{bp}]-0.
Kein Framework-Auswahl-Dialog — bewusst genau ein Grid.
Voraussetzungen
- PHP 8.2+
- Contao 5.3 – 6.x
Installation
composer require think-digital-agency/contao-grid-plugin
php bin/console cache:clear && php bin/console cache:warmup
php bin/console contao:migrate
Registriert sich automatisch über den Contao Manager Plugin. Feld- und
Elementtyp-Namen (dma_simplegrid_*) sind absichtlich stabil gehalten, damit
bereits bestehender Content ohne Update weiterläuft.
Nicht portiert (0 Nutzung im Ziel-Theme): row-/column-Elemente, Formularfeld- Typen, push/pull/offset-right/block-grid/zusätzliche Klassen. Die zugehörigen Spalten bleiben erhalten (SQL-only) und werden von einer späteren Migration entfernt.
Lizenz
LGPL-3.0-or-later — siehe LICENSE.
Entwickelt von Think Digital Agency.