Group Content view in og 8

Created on 5 March 2019, about 6 years ago
Updated 17 January 2025, 4 months ago

Problem/Motivation

The Views plugin "OG User Groups" in Drupal 7 provides a default argument for a view to show content from Organic Groups (OG) that the currently logged-in user is a member of. This functionality is essential for displaying user-specific content in OG-enabled sites, but it is currently missing in Drupal 8+.

Proposed resolution

Port the "OG User Groups" Views plugin to Drupal 8+ by implementing it as a ViewsArgumentDefaultPluginBase plugin. The plugin will provide the same functionality as the Drupal 7 implementation, returning the group IDs of the logged-in user.

Remaining tasks

  • Create the plugin class and register it in the module.
  • Replicate the functionality of og_plugin_argument_default_user_groups in the new plugin.
  • Write test cases to ensure the plugin works correctly.
  • Submit a patch or merge request for review on Drupal.org.

User interface changes

None.

API changes

Adds a new plugin to the Views API to provide the "OG User Groups" argument default functionality.

Data model changes

None.

Original request

I've used og 7 2.x quite a bit and am now kicking the tires on og8.

What is the general approach for showing group content on the group page? There doesn't appear to be any views realted to this and I don't think there is a version of og_extras for 8.x yet.

Do we roll our own with views? Use Page manager? Is it something that has just not landed yet?

Thanks,

โœจ Feature request
Status

Needs review

Version

1.0

Component

og.module

Created by

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024