Answers.Body: <p>Have a look at the 'Going Through Matrix' section at <a href="http://buildwithcraft.com/docs/relations#the-relatedTo-param" rel="noreferrer">http://buildwithcraft.com/docs/relations#the-relatedTo-param</a>.</p>
  
  <pre><code>{% set articles = craft.entries.section('articles').relatedTo({
      targetElement: entry,
      field: 'myMatrixField.fieldHandle'
  }) %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-30T21:51:56.083Z
Answers.Text: This works. Thanks.
  
  I thought I had tried this and it didn't work, but I must have slipped the block type handle in there along with the field handle.
Answers.UserDisplayName: David Schafer
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-30T21:10:06.023Z
Answers.LastActivityDate: 2015-11-30T21:10:06.023Z
Answers.UserDisplayName: crawf
Body: <p>I have a site with channels <em>‘articles’</em> and <em>‘tutorials.’</em> An article entry has a matrix field which contains an entry field to link to a tutorial. Every tutorial is linked from within at least one article.</p>
  
  <p>I would like each tutorial page to link back to the articles it appears in.</p>
  
  <p>If I'm on a tutorial page and have the following code in my template…</p>
  
  <pre><code>{% set articles = craft.entries.section('articles').relatedTo(entry) %}
  {{ articles|length }}
  </code></pre>
  
  <p>articles|length is always zero.</p>
  
  <p>I did a test with just a simple entry field to link to a tutorial and that works fine. Is there something special that needs to be done to get it to work with a matrix field? Could it be a configuration issue?</p>
  
Tags: <matrix><relations>
Title: Reverse Related entries with Matrix Field
ThreadText: # Reverse Related entries with Matrix Field
  
  (Asked by: username_0 on 2015-11-30)
  
  I have a site with channels *‘articles’* and *‘tutorials.’* An article entry has a matrix field which contains an entry field to link to a tutorial. Every tutorial is linked from within at least one article.
  
  I would like each tutorial page to link back to the articles it appears in.
  
  If I'm on a tutorial page and have the following code in my template…
  
  ```
  {% set articles = craft.entries.section('articles').relatedTo(entry) %}
  {{ articles|length }}
  
  ```
  
  articles|length is always zero.
  
  I did a test with just a simple entry field to link to a tutorial and that works fine. Is there something special that needs to be done to get it to work with a matrix field? Could it be a configuration issue?
  
  **Tags:** matrix, relations
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-11-30. Score: 6 | Accepted answer
  
  Have a look at the 'Going Through Matrix' section at <http://buildwithcraft.com/docs/relations#the-relatedTo-param>.
  
  ```
  {% set articles = craft.entries.section('articles').relatedTo({
      targetElement: entry,
      field: 'myMatrixField.fieldHandle'
  }) %}
  
  ```
  
  > **Comments:**
  > **username_0**: This works. Thanks.  I thought I had tried this and it didn't work, but I must have slipped the block type handle in there along with the field handle.  
  
  ---
  
  