Skip to content

Allow per layout block types permissions

Francesco Pesenti requested to merge layout_specific_block_types_permissions into 1.0.x

This PR adds a new block types configuration specific per section.

Screenshot_2022-09-13_at_15.52.46

How to test

  1. Create two block types, eg. hero and list item, enable them for LB+
  2. In admin/config/content/lb_plus_layouts set only the hero one available for a layout, eg. “One column”, and set both available for another layout, eg. “Two columns”
  3. Create a content, edit the layout and add a section using the configured layout, eg. “One column”
  4. Open the choose block tray, notice that only the available block type is visible
  5. Click the “Configure section” link, check the “Restrict blocks types for One column”, change the available block types
  6. Notice that the available block types are changed in the tray
  7. Add another section, eg. “Two columns”, change the configuration and try to drag&drop the blocks
  8. Notice that the layout specific configuration is respected

Merge request reports

Loading