Answers.Body: <p>This is untested but, give it a try:</p>
  
  <pre><code>{% extends "_layout" %}
  {% set title = "Games" %}
  {% set entries = craft.entries.section('games').limit(10).order('title') %}
  {% block content %}
  &lt;ul&gt;
      {% for entry in entries %}
          &lt;li&gt;
              {% for category in entry.GamesGenre %}{{ category.title }}{% endfor %}: &lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt; {% set publishers = entry.GamesPublisher %}{% for publisher in publishers %}({{ publisher.title }}{% endfor %}, {{ entry.GamesReleaseYear.format('Y') }})
          &lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  {% endblock %}
  </code></pre>
  
  <p>If need be, have a look at <a href="https://straightupcraft.com/articles/introduction-to-relations-and-reverse-relations-in-craft-cms-with-examples" rel="nofollow noreferrer">An introduction to relations and reverse relations in Craft CMS, with examples</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-18T08:11:24.933Z
Answers.Text: Congrats! You won the line length competition against @user1513427
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-18T15:25:45.497Z
Answers.Text: Yes, works like a charm. You saved my project!
Answers.UserDisplayName: DevServe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-18T16:59:40.980Z
Answers.Text: Not how I would have done it but, when in Rome.
Answers.UserDisplayName: Natetronn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-19T14:33:42.347Z
Answers.Text: @Natetronn, how would you have done it?
Answers.UserDisplayName: DevServe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-20T19:00:45.910Z
Answers.Text: Oh, don't listen to us. Do it how your team (or you) prefers it. That said, I might have added a bit more whitespace (spaces, tabs, newlines etc.) Check out to the docs to better understand [what happens to your whitespace in Twig](http://twig.sensiolabs.org/doc/templates.html#whitespace-control) and how to control it, if need be.
Answers.UserDisplayName: Natetronn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-18T07:06:28.633Z
Answers.LastActivityDate: 2016-12-18T07:06:28.633Z
Answers.UserDisplayName: Natetronn
Body: <p>I have two sections:</p>
  
  <ul>
  <li>Games </li>
  <li>Publishers</li>
  </ul>
  
  <p>Games has a field called "GamesPublisher" that is a relation (field type "Entries"), the Source is "Publishers".</p>
  
  <p>In my template to show an entry from games, I want to display the default field "title" of a publisher that I assigned to the games entry in the admin CP.</p>
  
  <pre><code>{% extends "_layout" %}
  {% set title = "Games" %}
  {% set entries = craft.entries.section('games').limit(10).order('title') %}
  {% block content %}
  &lt;ul&gt;
      {% for entry in entries %}
          &lt;li&gt;
              {% for category in entry.GamesGenre %}{{ category.title }}{% endfor %}: &lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt; (***Put Title of Publisher Here***, {{ entry.GamesReleaseYear.format('Y') }})
          &lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  {% endblock %}
  </code></pre>
  
  <p>The place I want to insert the publisher's title is shown as:
  <strong><em>Put Title of Publisher Here</em></strong></p>
  
  <p>Thanks all. I just started using Craft about 3 hours ago for the first time!</p>
  
Tags: <templating><sections><category>
Title: Display field from one section in another section
ThreadText: # Display field from one section in another section
  
  (Asked by: username_0 on 2016-12-18)
  
  I have two sections:
  
  * Games
  * Publishers
  
  Games has a field called "GamesPublisher" that is a relation (field type "Entries"), the Source is "Publishers".
  
  In my template to show an entry from games, I want to display the default field "title" of a publisher that I assigned to the games entry in the admin CP.
  
  ```
  {% extends "_layout" %}
  {% set title = "Games" %}
  {% set entries = craft.entries.section('games').limit(10).order('title') %}
  {% block content %}
  <ul>
      {% for entry in entries %}
          <li>
              {% for category in entry.GamesGenre %}{{ category.title }}{% endfor %}: <a href="{{ entry.url }}">{{ entry.title }}</a> (***Put Title of Publisher Here***, {{ entry.GamesReleaseYear.format('Y') }})
          </li>
      {% endfor %}
  </ul>
  {% endblock %}
  
  ```
  
  The place I want to insert the publisher's title is shown as:
  ***Put Title of Publisher Here***
  
  Thanks all. I just started using Craft about 3 hours ago for the first time!
  
  **Tags:** templating, sections, category
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-12-18. Score: 1 | Accepted answer
  
  This is untested but, give it a try:
  
  ```
  {% extends "_layout" %}
  {% set title = "Games" %}
  {% set entries = craft.entries.section('games').limit(10).order('title') %}
  {% block content %}
  <ul>
      {% for entry in entries %}
          <li>
              {% for category in entry.GamesGenre %}{{ category.title }}{% endfor %}: <a href="{{ entry.url }}">{{ entry.title }}</a> {% set publishers = entry.GamesPublisher %}{% for publisher in publishers %}({{ publisher.title }}{% endfor %}, {{ entry.GamesReleaseYear.format('Y') }})
          </li>
      {% endfor %}
  </ul>
  {% endblock %}
  
  ```
  
  If need be, have a look at [An introduction to relations and reverse relations in Craft CMS, with examples](https://straightupcraft.com/articles/introduction-to-relations-and-reverse-relations-in-craft-cms-with-examples)
  
  > **Comments:**
  > **username_2**: Congrats! You won the line length competition against @user1513427  
  > **username_0**: Yes, works like a charm. You saved my project!  
  > **username_1**: Not how I would have done it but, when in Rome.  
  > **username_0**: @username_1, how would you have done it?  
  > **username_1**: Oh, don't listen to us. Do it how your team (or you) prefers it. That said, I might have added a bit more whitespace (spaces, tabs, newlines etc.) Check out to the docs to better understand [what happens to your whitespace in Twig](http://twig.sensiolabs.org/doc/templates.html#whitespace-control) and how to control it, if need be.  
  
  ---
  
  