title: How to pass arguments between views in Drupal-7
body: <p>I consistently find myself up against the following use case, and have yet to grok the proper workflow / solution:</p>
  
  <p>I would like to display two views.</p>
  
  <p>In the first view, each row displays one node of type-x.</p>
  
  <p>The second view shows nodes of type-y, which are associated with node type-x via a nodereference, as follows:</p>
  
  <pre><code>    View-1   View-2
      ------   ------
  row1 X-a &lt;---&gt; Y-a
  row2 X-b &lt;---&gt; Y-b
  row3 X-c &lt;---&gt; Y-c
  row4 etc &lt;---&gt; etc
  </code></pre>
  
  <p>For example, X is an event, and Y is a venue. Or, X is a porfolio page, and Y is a paged gallery.</p>
  
  <p>I understand that there are other ways of approaching this - for example using node views rather than fields, but I am trying to leverage views to create 2 distinct custom queries related by an argument passed from one view to the other.</p>
  
  <p>This is a variation of a question I asked earlier (<a href="https://stackoverflow.com/questions/5639328/programmatic-views-in-drupal-7">Programmatic Views in Drupal 7</a>), and hopefully a clarification.</p>
  
  <p>Any help, even (or especially) just on the semantic level, is greatly appreciated.</p>