Answers.Body: <blockquote>
    <p>Wasn't sure if I need to also setup a field type entries in GamePublishers to reference to Games section.</p>
  </blockquote>
  
  <p>Not necessary if you already have a "GamePublishers" Entry field in the "Games" section.</p>
  
  <p>Something like this should work:</p>
  
  <pre><code>{% set games = craft.entries.section('games').relatedTo(publisher) %}
  </code></pre>
  
  <p>That's assuming you've already got a variable named <code>publisher</code> defined that's referencing the current publisher the user is viewing.</p>
  
  <p>I'd suggest reading through the <a href="https://craftcms.com/docs/relations" rel="nofollow noreferrer">relations</a> docs as well.  Craft has a pretty powerful relations engine you can do all sorts of crazy stuff with.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-18T23:36:16.593Z
Answers.Text: I tried this but didn't work...
  
  {% extends "_layout" %}
  
  {% block content %}
   <article>
    <h1>{{ entry.title }}</h1>  
    {{ entry.body }}
   </article>
   
   {% set games = craft.entries.section('games').relatedTo(publisher) %}
   <ul>
      {% for entry in entries %}
          <li>
              <a href="{{ entry.url }}">{{ entry.title }}</a> ({{ entry.GamesReleaseYear.format('Y') }})
          </li>
      {% endfor %}
   </ul>
  {% endblock %}
Answers.UserDisplayName: DevServe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-19T00:30:12.403Z
Answers.Text: That's a bit hard to read, are you defining the variable `publisher` somewhere?  It should be a reference to the publisher the user is currently viewing.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-19T02:11:49.743Z
Answers.Text: Ok, I updated it. It is listing games, but it is listing ALL games and not those specific to the publisher. I'm using: {% set entries = craft.entries.section('games').relatedTo(GamesPublisher) %}
Answers.UserDisplayName: DevServe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-18T17:09:07.333Z
Answers.LastActivityDate: 2016-12-18T17:09:07.333Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>Think I finally got it. Here is my code.</p>
  
  <pre><code>{% extends "_layout" %}
  
  {% block content %}
      &lt;article&gt;
          &lt;h1&gt;{{ entry.title }}&lt;/h1&gt;      
          {{ entry.body }}
      &lt;/article&gt;
  
      &lt;h2&gt;Games&lt;/h2&gt;
  
      {% set entries = craft.entries.section('games').relatedTo(entry) %}
  
      &lt;ul&gt;
          {% for entry in entries.order('title') %}
              &lt;li&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;{% if entry.GamesGenre is not empty %} ({% for category in entry.GamesGenre %}{{ category.title }}{% endfor %}){% endif %}&lt;/li&gt;
          {% endfor %}
      &lt;/ul&gt;
  
  {% endblock %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-19T02:44:29.743Z
Answers.LastActivityDate: 2016-12-19T04:07:05.423Z
Answers.LastEditDate: 2016-12-19T04:07:05.423Z
Answers.UserDisplayName: DevServe
Body: <p>I have two sections:
  games
  publishers</p>
  
  <p>For example, a games entry title would be "Mario Brothers" and a publishers entry title would be "Nintendo"</p>
  
  <p>On the entry page for Nintendo, I want to display all games (entries) they published.</p>
  
  <p>The "_entry,html" page for publishers right now only has the following code:</p>
  
  <pre><code>{% extends "_layout" %}
  
  {% block content %}
      &lt;article&gt;
          &lt;h1&gt;{{ entry.title }}&lt;/h1&gt;      
          {{ entry.body }}
      &lt;/article&gt;
  {% endblock %}
  </code></pre>
  
  <p>So I know I need to add it after:</p>
  
  <pre><code>&lt;/article&gt;
  </code></pre>
  
  <p>In the games section, I have a field called "GamePublishers" set to type Entries. So I assign the publisher of a game via the admin cp. Wasn't sure if I need to also setup a field type entries in GamePublishers to reference to Games section. (If that makes sense)</p>
  
  <p>Thanks</p>
  
Tags: <entry><sections><loop>
Title: Loop through related section's entries
ThreadText: # Loop through related section's entries
  
  (Asked by: username_0 on 2016-12-18)
  
  I have two sections:
  games
  publishers
  
  For example, a games entry title would be "Mario Brothers" and a publishers entry title would be "Nintendo"
  
  On the entry page for Nintendo, I want to display all games (entries) they published.
  
  The "\_entry,html" page for publishers right now only has the following code:
  
  ```
  {% extends "_layout" %}
  
  {% block content %}
      <article>
          <h1>{{ entry.title }}</h1>      
          {{ entry.body }}
      </article>
  {% endblock %}
  
  ```
  
  So I know I need to add it after:
  
  ```
  </article>
  
  ```
  
  In the games section, I have a field called "GamePublishers" set to type Entries. So I assign the publisher of a game via the admin cp. Wasn't sure if I need to also setup a field type entries in GamePublishers to reference to Games section. (If that makes sense)
  
  Thanks
  
  **Tags:** entry, sections, loop
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-12-18. Score: 1 | Accepted answer
  
  > Wasn't sure if I need to also setup a field type entries in GamePublishers to reference to Games section.
  
  Not necessary if you already have a "GamePublishers" Entry field in the "Games" section.
  
  Something like this should work:
  
  ```
  {% set games = craft.entries.section('games').relatedTo(publisher) %}
  
  ```
  
  That's assuming you've already got a variable named `publisher` defined that's referencing the current publisher the user is viewing.
  
  I'd suggest reading through the [relations](https://craftcms.com/docs/relations) docs as well. Craft has a pretty powerful relations engine you can do all sorts of crazy stuff with.
  
  > **Comments:**
  > **username_0**: I tried this but didn't work...  {% extends "_layout" %}  {% block content %}  <article>   <h1>{{ entry.title }}</h1>     {{ entry.body }}  </article>    {% set games = craft.entries.section('games').relatedTo(publisher) %}  <ul>     {% for entry in entries %}         <li>             <a href="{{ entry.url }}">{{ entry.title }}</a> ({{ entry.GamesReleaseYear.format('Y') }})         </li>     {% endfor %}  </ul> {% endblock %}  
  > **username_1**: That's a bit hard to read, are you defining the variable `publisher` somewhere?  It should be a reference to the publisher the user is currently viewing.  
  > **username_0**: Ok, I updated it. It is listing games, but it is listing ALL games and not those specific to the publisher. I'm using: {% set entries = craft.entries.section('games').relatedTo(GamesPublisher) %}  
  
  ---
  
  ### Answer by username_0 on 2016-12-19. Score: 0
  
  Think I finally got it. Here is my code.
  
  ```
  {% extends "_layout" %}
  
  {% block content %}
      <article>
          <h1>{{ entry.title }}</h1>      
          {{ entry.body }}
      </article>
  
      <h2>Games</h2>
  
      {% set entries = craft.entries.section('games').relatedTo(entry) %}
  
      <ul>
          {% for entry in entries.order('title') %}
              <li><a href="{{ entry.url }}">{{ entry.title }}</a>{% if entry.GamesGenre is not empty %} ({% for category in entry.GamesGenre %}{{ category.title }}{% endfor %}){% endif %}</li>
          {% endfor %}
      </ul>
  
  {% endblock %}
  
  ```
  
  
  ---
  
  