Provide paragraph display mode block configuration

Created on 5 June 2024, 8 months ago
Updated 2 July 2024, 7 months ago

Problem/Motivation

When placing a paragraph block via the block ui or the layout builder will always result in the default display mode being shown. There is no way to configure that. But there are use casings to display the same paragraph type with different display modes.

Proposed resolution

  • The block configuration should have a setting for "display mode" where you can select any of the available modes for that paragraph type.
  • You should also be able to set a default display mode in the paragraph's parent entity configuration. So the current "set and forget" behaviour can be retained.
  • Current paragraph blocks saved without this configuration should still work. (migration? or just set "default" to all current paragraph blocks in an update hook?)
  • \Drupal\paragraph_blocks\Plugin\Block\ParagraphBlock::build() has a line that builds the output setting default as display mode: $build = $view_builder->view($paragraph, 'default');. This needs to be replaced.
Feature request
Status

Fixed

Version

4.0

Component

Code

Created by

🇳🇱Netherlands basvredeling Amsterdam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024