Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This project dynamically generates layout regions using CSS Grid, allowing for flexible and unique page structures. It provides a user-friendly interface to configure grid settings and generate CSS on the fly.

This layout forwards grid CSS features to the settings form in an assisted, user-friendly way (WIP). The actual CSS and the regions are created dynamically. Infinite variations are possible!

Regular Layout plugins provide a predefined set of regions, whereas in generic_layout, regions are defined and varied per layout instance using the CSS Grid API. In my opinion CSS Grid is simple enough to be used by 'WYSIWYG designers' but gives max source of truth and control for a the price of learning some CSS. A supportive, intuitive UI is key to success.

The best demo for now is my website https://rollgut.com?debug=true. By appending `?debug=true` every GenericLayout is outlined blue and css from ui_styles is also uncovered. You can use your browser's development tools (1st image attachment) or Visual CSS Editor to visualise the grid, that comes from GenericLayout (as seen in the screenshot).

The CSS modifiers controlling margin, padding and even gap are not part of GenericLayout. They come from implementing drupal/ui_styles of UI Suite. GenericLayout really just concentrates on CSS Grid, it's modulation accross Breakpoints and a proper interface to Drupals API and backend.

Patch Callers of LayoutEntityHelperTrait::getEntitySections() do not account for the view mode is required.

Implementation Details

Due to the infinite variations possible with this layout, a sophisticated CSS solution was required:

This layout differs from the traditional design of providing a static "CSS utility" file and varying the CSS classes per configuration. Instead, a CSS file is generated for every layout and attached as a library to allow caching.

Dynamic Libraries feature

By the time of coding this, i found no Drupal API or module providing "dynamic libraries,", so I've cooked a solution on my own. What sucks here is the GenericLayout instance detection algorithm. You must Save a new entity one time to make its Layouts discoverable.. If someone knows a better API-use / architecture -> please share!

Roadmap

  • Intuitive UI: Create smart (ai driven!?) autocompletions for every textfield
  • Support json import/export. Thats fundamental to integrate Ai Agents but could potentially also serve an extension like Visual CSS Editor (2nd image attachment)

Activity

Total releases
1
First release
Feb 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Release date
1.0.0-rc5 Pre-release Feb 6, 2025