0

I will post down an image I edited to better help you understand what I'm asking for enter image description here

The reason is I've more than 50 different views that filters the same objects from a single content type based on their personal taxonomy term that differentiates them in some sub-categories, but I want those views to also have a common filter for the Year in which they were created (for development reasons, the year is a taxonomy term with just a number like "2018" "2019") so that when I want the users to view the content created this year (2019) I just have to modify one filter criteria and update it for everyone else. Currently you can only have a single filter criteria section which can either be "for all" or "for this page", this means I've to manually change the year filter for all 50 of them because I need filter criteria to be Overriden in every single view to introduce a filter for each sub categories. Is there a solution to this? a module? Or were can I find the PHP code which regolates how filters works?

closed as off-topic by Free Radical, kiamlaluno Feb 19 at 19:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking to recommend or find a book, tool, module, theme, distribution, tutorial, or other off-site resource are off-topic for Drupal Answers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Free Radical, kiamlaluno
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Hi, usually module recommendations or requests for documentation links are considered off-topic. You can find a lot of information depending on your Drupal version at either drupal.org/docs and api.drupal.org/api/views regarding views – mradcliffe Jan 24 at 12:36
1

You can't influence all Views that way at one go, that wouldn't make any sense because you can have various Views types (content, user, taxonomy term).

What you can have is a Master display within one View that can be used as a template for creating new displays. But that isn't what you're asking for.

You're asking for partial Filter handling, some Filters applied to all displays, and some Filters overridden for particular displays. But that isn't available AFAICT, at least not without complex code interventions.

But I think you might be helped with Contextual filters. Usually they are used when you need to Filter according to each taxonomy term, for example. It's tedious to create a new display for each term, instead, you let Drupal calculate that on the fly.

The same with the Date, you can use a Contextual filter on Authored on field to show only the ones from a particular year.

Automation is key when dealing with a large number of data.

Here's a couple of quick tutorials about Contextual filters: Using Drupal Contextual Filters in Views, How to use Contextual Filter in Drupal 8

  • Thank you very much, I'll dig deep into those topics and find a way to make it work – Alessandro Conti Jan 27 at 0:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.