I have the following code:
{exp:channel:entries uri_page="{last_segment}"}
<!--Set some stash variables here, then:-->
{exp:stash:set name="content"}
<!--Some markup here, then:-->
<section class="container">
<h3>
Related Articles
</h3>
<ul>
{related_articles}
<li>
<h4>{related_articles:title}</h4>
<p>
{related_articles:excerpt}
<a class="action" href="#">Continue reading</a>
</p>
</li>
{/related_articles}
</ul>
</section>
<!--Some more markup.-->
{/exp:stash:set}
{/exp:channel:entries}
Yet the relationship tags aren’t parsed at all. The output is:
<section class="container">
<h3>
Related Articles
</h3>
<ul>
{related_articles}
<li>
<h4>{related_articles:title}</h4>
<p>
{related_articles:excerpt}
<a class="action" href="#">Continue reading</a>
</p>
</li>
{/related_articles}
</ul>
</section>
I’ve made sure that the relationship field is named correctly ({related_articles}
) and that the related articles are saved to the entry. All the other fields in the entry are parsed correctly in my template; only the relationships don’t get parsed.
I tried adding channel="channel_name"
to the exp:channel:entries
tag, thinking maybe EE needs to have a specific channel set in order for Relationships to work, but to no avail. I’ve also confirmed that the Relationships field type is installed (which is confirmed by the fact that I was able to create the field in the first place, but I’m grasping at straws here).
I’ve searched far and wide, and have been unable to find a solution to this, nor anybody reporting the same issue. Any help will be greatly appreciated!
{/related_articles}
further below in the markup. This was the product of a copy/paste in which I changed the opening tag but probably got distracted and missed the closing tag, causing hours of grief. So, if you’re having the issue of relationship tags not being parsed at all, make sure you don’t have any extra closing tags below it from having hastily copied and pasted it.