Problem/Motivation

When embedding a View via the Views Reference field (commonly on a Paragraph type), site builders cannot adjust views_bootstrap grid-related options (e.g., columns per breakpoint, gutter/row behavior) per instance. Today this forces duplication of Views displays just to vary grid settings by context, increasing maintenance overhead and limiting flexibility.

It would be useful if views_bootstrap exposed a ViewsReferenceSetting plugin so editors can override grid settings per referenced View instance, similar to how other modules integrate with Views Reference. Reference implementation pattern: viewsreference/src/Plugin/ViewsReferenceSetting.

Steps to reproduce

  1. Create a Paragraph type with a Views Reference field.
  2. Create a View that uses a Views Bootstrap grid style (e.g., Grid/Cards) with specific column settings.
  3. Add two Paragraphs referencing the same View where each context needs different grid columns (e.g., 2-col vs 4-col at md).
  4. Observe: there is no per-reference UI to change the grid; you must duplicate the View/display to achieve different grids.

Proposed resolution

  • Add a ViewsReferenceSetting plugin in views_bootstrap to expose grid-related options on the Views Reference widget/form, enabling per-entity overrides.
  • Initial options to expose (subject to maintainer feedback):
    • Columns per breakpoint (e.g., xs/sm/md/lg/xl/xxl or Bootstrap row-cols equivalents).
    • Gutter/row behavior (where applicable).
    • Optional flags such as equal height/stacking if provided by the chosen style plugin.
  • Implementation sketch:
    • Create plugin class under Plugin/ViewsReferenceSetting/BootstrapGrid.php (or per-style variants) that reads/writes the style options and applies them via the Views Reference settings alter hook.

Remaining tasks

  • Confirm the exact set of grid options that should be overrideable per reference.
  • Implement the ViewsReferenceSetting plugin(s) with form elements and value mapping to the style plugin options.
  • Add automated tests (kernel/unit) to verify option persistence and runtime application.
  • Update documentation with usage examples and screenshots.
  • Changelog entry and release note.

User interface changes

  • New settings section on the Views Reference widget/edit form exposing grid controls (visible only when the referenced display uses a views_bootstrap grid style).

API changes

  • New ViewsReferenceSetting plugin class(es) provided by views_bootstrap; no breaking changes to existing APIs.

Data model changes

  • No changes required — settings schema for ViewsReferenceSetting plugins is handled by the viewsreference module.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

trackleft2 created an issue. See original summary.

trackleft2’s picture

Status: Active » Needs review

shelane made their first commit to this issue’s fork.

  • shelane committed 5512cbbf on 5.5.x authored by trackleft2
    Issue #3541040: Add ViewsReferenceSetting plugins for Bootstrap Grid and...
shelane’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.