Override entity render view mode and ctools block configurations

Created on 31 May 2024, 7 months ago
Updated 1 June 2024, 7 months ago

Problem/Motivation

Integrate block configuration overrides from Chaos Tool Suite (drupal/ctools) and Views Override View Mode (druapl/views_override_viewmode) such as:

  • Pager offset
  • Pager type
  • Hide fields
  • Reorder fields
  • Configure filters
  • Disable filters
  • Configure sorts
  • View mode.

Combining Contextual filter, View mode, Sorting, Item per page, and pager allows all content editors to create visually stunning page designs that embed structured Drupal content (Events, Articles, Profiles, ...) via easy-to-use WYSIWYG Gutenberg editor.

Steps to reproduce

Current override options do not include the ability to configure entity render view mode, and there are issues with configuring multi-step sorting.

Proposed resolution

Class extends "CtoolsBlock" instead of "Block". Integrate View mode configuration based on Views Override View Mode .

Remaining tasks

Rewrite Views Override View Mode by jpoesen to add override options to `views_block_override` block instead of sytem `block`.

User interface changes

Additional block configuration overrides:

  • Pager offset
  • Pager type
  • Hide fields
  • Reorder fields
  • Configure filters
  • Disable filters
  • Configure sorts
  • View mode.

API changes

I suggest removing duplicate override configuration options and keeping a more intuitive Ctools soring. This would also reduce the module maintenance, reducing the number of custom configuration overrides that need to be maintained in this module. However, backward incompatible changes would need to be scheduled for the next major release.

Data model changes

  • Additional schema for storing View mode configuration.
  • Extend extends "CtoolsBlock" instead of "Block".
  • Additional module dependencies: `drupal:block`, `ctools:ctools_views`.

Integrates issue #3409785 🐛 Deprecated function: Creation of dynamic property Drupal\views_block_override\Plugin\views\display\ViewsBlockOverride::$block is deprecated Needs work patch, to resolve $block is deprecated error.

Feature request
Status

Needs review

Version

1.2

Component

Code

Created by

🇸🇦Saudi Arabia martins.bruvelis Thuwal

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