Bird
Bird

Reputation: 580

Drupal 8 - How to display in a view all contents that were NOT created by the current logged in user

Pretty simple and quite frustrating.

I am unable to find an elegant solution for the problem problem stated in the title (really it's all in the title). If possible, I would like to add a simple filter criteria in the drupal interface.

I am new to preprocessed function and drupal, but I understand quite well how it works. It just seems quite messy to find the right variable...

it's all!

Thanks.

Upvotes: 1

Views: 660

Answers (1)

VJamie
VJamie

Reputation: 636

The way I would do it is by adding a contextual filter on Authored By of the content.

When configuring the contextual filter, under the "When the filter value is NOT available" -> Provide default value -> User ID from logged in user

You also have to exclude this in the more section, this will negate the condition.

Contextual filter configuration This should solve your problem.

Upvotes: 2

Related Questions