Search by

think-digital-agency / contao-grid-plugin

think-digital-agency

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

Statistics

Installs: 23

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v2.0.3 2026-09-18 09:20 UTC

This package is auto-updated.

Last update: 2026-09-18 09:35:20 UTC


README

License

[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 mit cssID eingehängt. Gespeichert im Feld dma_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 flache class lesen.
  • 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 hided-{bp}-none, Offsetwert resetoffset[-{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.