Grid Layout configuration in Paragraphs Collection 8
The Grid plugin has introduced a new type of YAML configuration: paragraphs_collection.paragraphs.grid_layout.yml.
It offers a way to define grid layouts that can be reused:
- wrapper_classes: is applied to the Grid wrapping element.
- columns: each element in the "columns" configuration array represents one column in the layout output. For example, if this configuration array has 3 elements, it would result in 3 columns in the output. Any number of classes is allowed per column.
- libraries: specifies the path to the libraries.yml file where it is defined where to find the CSS rules for the class elements described in the "columns" configuration array.
The attributes structure defined in the YAML configuration should be as follows (still temporary):
title: 'Two columns layout'
description: 'Defines a two column layout with 8-4 widths.'
wrapper_classes:
- 'paragraphs-behavior-grid-layout-row'
columns:
- classes:
- 'paragraphs-behavior-grid-layout-col-8'
- classes:
- 'paragraphs-behavior-grid-layout-col-4'
libraries:
- 'paragraphs_collection/grid_layout'
See also
paragraphs_collection.paragraphs.grid_layouts.yml
File
- ./
paragraphs_collection.api.php, line 52 - Hooks and documentation related to paragraphs_collection module.