Can I make interaction between views relations and views arguments?

Solutions

Thanks for the suggestions Andrew, I ended up creating a custom argument-handler. It adds one (or more) extra conditions to the join. LEFT JOIN ... AND ....

function query($group_by = FALSE) {
  $this->ensure_my_table();

    $this->query->table_queue[$this->table_alias]['join']->extra = array(
      array('table' => $this->table_alias, 'field' => $this->real_field, 'value' => $this->argument),
    );
  }
}
Tags: Views / Nodes

Similar questions

Referencing logged user and node relations.
I am trying to solve a problem with no luck: I have 4 objects in Drupal: Company user can add/edit/delete own Project nodes. Mod user can a/e/d own Person nodes. I would love to accomplish next: Mod can reference (add) Persons to Projects. Example : Person A, Person B,... (both owned by Mod1 user) can be referenced (added) to Project 1, Project 2, ...
How to do user relations, and User editing only their content?
Doing Drupal 8.6 is hard (I come from Laravel and Wordpress world). I manage to do by myself OAuth token authentication with Vue, but I stopped on User relations and content-type. I know that where is programmer there is a way, but I just want to see what you do things then choose best option. How can I, for example, create a friends system? With n...
Multiple Relations and Contextual Filters in a Translated View
I have a View designed to filter down translated content (of type "Asks, Actions, and Updates") using three arguments: 1) country 2) year 3) month. I have translated the content type and content, all three vocabularies and terms, and the View. I want the URL to be readable, so the View has a relationship to the three vocabularies. I also have four ...
Drupal Views: difference between Filters and Arguments?
What difference between Filters and Arguments? E.g. if I need to show nodes where event_start is located inside specified month, which one should I use?
drupal multiple view arguments with PHP code validation for empty arguments
I have a view set up to accept 2 arguments. The url is like this: playlists/video5/%/%/rss.xml It works fine if I supply the url with 2 arguments like playlists/video5/front/coach/rss.xml. I have 2 arguments of "Taxonomy: Term" But I need it to run even if 1 or no arguments are supplied. It looks like you can do this with PHP Code under: Provide de...
Help with relations in views
Have been struggled with this problems for days and I wonder if someone could have a look at it? I have tried me sleepless to achieve a certain table in views between three content types which has relations between them, using entity reference. The biggest issue is that I can't wrap my head around how I should set up my relations. Since this is dri...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.