I have a section called reviews and a section called games. A entry field in games is creating a relationship to reviews.
On my _entry.html entry for reviews, I want to link back to the related game.
My code is below. I understand why it isn't working, but not sure how to fix it.
The template displays the Review entry title, the body some extra fields in reviews.
And then gets to the Game Link, but the link is not to my Games section but to my Reviews section.
In other words, on this review: http://www.colorcomputergames.com/reviews/1984-01-01/glaxxons
The link at the bottom should be to: http://www.colorcomputergames.com/games/glaxxons
But instead, goes to: http://www.colorcomputergames.com/reviews/1984-01-01/glaxxons
<h1>{{ entry.title }}</h1>
<ul>
{% if entry.ReviewsAuthor|length %}<li>Reviewer: {{ entry.ReviewsAuthor }}</li>{% endif %}
{% if entry.ReviewsMedia|length %}<li>Media: {% for category in entry.ReviewsMedia %}<a href="{{ category.url }}">{{ category.title }}</a>{% endfor %}</li>{% endif %}
{% if entry.ReviewsDate|length %}<li>Date: {{ entry.ReviewsDate.format('F Y') }}</li>{% endif %}
{% if entry.ReviewsRelatedLink|length %}<li>Related Link: {{ entry.ReviewsRelatedLink }}</li>{% endif %}
</ul>
{{ entry.body }}
{% set entries = craft.entries.section('games').relatedTo(entry) %}
<h3>Game Link:</h3>
<ul>
<li><a href="{{ entry.url }}" title="{{ entry.title }}">{{ entry.title }}</a></li>
</ul>
As mentioned, in section called Games, I have a field called GamesReview and set it to entries and assign the review entry. Do I need to do the opposite as well t make this work? That is, in my reviews section, create a field called GameReviewed and set it to entries and assign it to Games section.
Thanks