This extension provides Bootstrap 5 grid tools for Contao CMS.
- Manage grid definition in your theme settings
- Content elements
- Form elements
- Grid module
- Import/Export with your theme settings
See changelog
- PHP ^8.1
- Contao ^4.13 || ^5.3
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.0If 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()
];
}
}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: trueAfterwards you can run the migration in the Contao Manager or via CLI:
$ php vendor/bin/contao-console contao:migrateThe 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