Maybe this exist, but as i don't find a propre solution for the moment, i post the idea :

So the very simple concept is to have another filter or maybe better another block (like filter, fields...) named views filter wich take 4 arguments
- in or not in
- name of the view
- field used in the filtered view (to choice in normal filter with usual options)
- field used in the filter view (to choice in normal filter with usual options)

If it exists a ui solution (i find module solution or php solution), i would be very interessed by.

Comments

ndm’s picture

A possible solution not easy to install cause the names of the field and the view is hard to know
(you can know this variables with print_r(views_get_view('name_of_the_view')) or vardump(views_get_view('name_of_the_view')) ).

One solution

- create the view you want as filter
- open the view filtered
- add an argument
- define this argument with a default value and this value in php.
- check exclude and multi
- put this code with appropriates variables :

 //the php tags are here just for colors, don't use in the argument field
$view_name = '_complement_des_noeuds'; //internal name of the filtering view
$view_display = 'block_6'; //internal name of the display
$view_arguments = array(0=>$view->args[0]); //the argument for the filtering view, in this case the argument is the same for the filtering and the filtered view
$view_field = 'node_node_data_field_voir_aussi_nid'; //the name of the field which filters

//Execution de la vue
$sub_view = views_get_view($view_name);
$sub_view->args=$view_arguments;
$sub_view->set_display($view_display);
$sub_view->pre_execute();
$sub_view->execute();
foreach($sub_view->result as $l)$r.=$l->$view_field.",";
$sub_view->destroy();
return substr($r,0,strlen($r)-1);
iamjon’s picture

Status: Active » Fixed

Thanks for sharing your solution

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ndm’s picture

Status: Closed (fixed) » Needs review
dawehner’s picture

Status: Needs review » Active

Needs review means that there is a patch

IFL Todd’s picture

I know this is an older thread; but, I just want to say to ndm that this is a very nice find. Quite useful.

Thank you very much for posting this!

Todd

mustanggb’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)