Add Support for Views Contextual Filters

Created on 11 May 2023, over 1 year ago

Problem/Motivation

While using the Content Model Documentation β†’ module to create a document to describe my content types, I thought it would be great to display the fields that are a part of the content type.

Since Content Model Documentation provides urls with content type bundles as arguments (for example: admin/structure/types/manage/blog_entry/document) I was attempting to build a block view to display fields that are a part of a specific content type using contextual filters where the argument would be the bundle name (blog_entry in this example).

Contextual filters at the moment return all results without any filtering.

Steps to reproduce

  1. Install Content Model Documentation β†’ module
  2. Create a new view to show Configuration -> Fields
  3. Add a contextual filter "Config: Bundle"
  4. Configure the contextual filter to provide a fixed default value (set it to one of your configured content type bundle machine names

Following the above steps the view will not be filtered.

Proposed resolution

Build a views argument plugin that works with \Drupal\config_views\Plugin\views\query\ConfigEntityQuery.

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States lexfunk

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

Comments & Activities

Production build 0.71.5 2024