Skip to content

contao-bootstrap/grid

Repository files navigation

Contao-Bootstrap Grid Component

Version GitHub issues License Build Status Downloads

This extension provides Bootstrap 5 grid tools for Contao CMS.

Features

  • Manage grid definition in your theme settings
  • Content elements
  • Form elements
  • Grid module
  • Import/Export with your theme settings

Changelog

See changelog

Requirements

  • PHP ^8.1
  • Contao ^4.13 || ^5.3

Install

Managed edition

When using the managed edition it's pretty simple to install the package. Just search for the package in the Contao Manager and install it. Alternatively you can use the CLI.

# Using the contao manager
$ php contao-manager.phar.php composer require contao-bootstrap/grid ^3.0

# Using composer directly
$ php composer.phar require contao-bootstrap/grid ^3.0

Symfony application

If you use Contao in a symfony application without contao/manager-bundle, you have to register following bundles manually:

class AppKernel
{
    public function registerBundles()
    {
        $bundles = [
                        // ...
            new \ContaoBootstrap\Core\ContaoBootstrapCoreBundle(),
            new \ContaoCommunityAlliance\MetaPalettes\CcaMetaPalettesBundle(),
            new \Netzmacht\Contao\Toolkit\Bundle\NetzmachtContaoToolkitBundle(),
            new \Mvo\ContaoGroupWidget\MvoContaoGroupWidgetBundle(),
            new \ContaoBootstrap\Core\ContaoBootstrapCoreBundle(),
            new \ContaoBootstrap\Grid\ContaoBootstrapGridBundle()
        ];
    }
}

Migration

To automatically migrate your grid from Start- and Stop-Wrappers to nested fragments, you have to enable the migration via the bundle configuration. Create or extend the file config/packages/contao_bootstrap_grid.yaml in your Symfony application:

contao_bootstrap_grid:
    enable_wrapper_migration: true

Afterwards you can run the migration in the Contao Manager or via CLI:

$ php vendor/bin/contao-console contao:migrate

Deprecated

The legacy content elements bs_gridStart, bs_gridStop and bs_gridSeparator are deprecated and will be removed in a future major version. Use bs_grid_wrapper instead.

To disable the legacy elements now, set the following configuration:

contao_bootstrap_grid:
    enable_legacy_elements: false

About

Bootstrap 5 Contao Grid Component

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors