Using a node reference in Drupal 7, is there a way to tell what the parent node is? I have a content type called Movie, it has a node reference to a content type called LeadActor. The LeadActor content type can have node references of its own back to several different Movies nodes.

When I have a page that displays the full content of a Movie, I've changed the node template to have a link to the LeadActor. 

When a user uses the link to LeadActor from a Movie page, is there anyway for me to know what Movie the user came from when I'm on the LeadActor page?

I've thought about adding an extra argument to the LeadActor page link - the node id to the Movie, but I was wondering if there might be a cleaner way to handle this.

I'm using Drupal 7 and the node reference (references) module. I've also tried using the corresponding node references module - but so far I haven't been able to understand if this will work.

Thanks for your help.
Reading the text of your question, it looks like you don't necessarily need to know what the parent is but more where the visitor is coming from (and if it is a movie which one).  

A possible solution, as you mentioned, would be to add some parameters to the URL.  A simpler option might be just a tiny bit 'o javascript.

&lt;script type="text/javascript"&gt;
  (function ($) {
    $(document).ready(function() {
      var referrer =  document.referrer;
    });
  })(jQuery);
&lt;/script&gt;


Then use the referrer (previously browsed URL) and compare it against the list of movie URLs via JQuery.  If one matches, add a css class to style the link as an indicator.

&lt;script type="text/javascript"&gt;
  (function ($) {
    $(document).ready(function() {
      var referrer = document.referrer;
      $('#movie-list li a').each(function(index) {
        if ($(this).attr('href') == referrer) {
          $(this).addClass("active-movie");
        }
      });
    });
  })(jQuery);
&lt;/script&gt;


Where

&lt;ul id="movie-list"&gt;
  &lt;li&gt;&lt;a href="http://example.com/duck"&gt;duck&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://example.com/duck"&gt;duck&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://example.com/goose"&gt;goose&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;