I’m afraid I’m totally confusing myself with this reverse_related_entries issue I’m having so I’ll try and explain simply!
I have two weblogs, “our_work” (portfolio template) and “project” (project template). “project” is related to “our_work”.
Here’s a template for example. In the right sidebar you see the “our_work” entries are the main sections and the sub-sections are the projects. Everything is working nicely here.
The problem occurs when clicking on one of the projects, like this. I’m not sure how to only show the reverse_related_entries underneath it’s related weblog. I can either get it to show all related entries for EVERY “our_work” entry or no entries.
I can’t figure out a proper conditional for this particular situation! Any help is much appreciated!
My sidebar template, which looks perfect on the Portfolio page but not Project page, looks like this.
<!--begin #right_sidebar-->
<div id="right_sidebar">
{exp:weblog:entries weblog="our_work" dynamic="off" disable="{disabled}"}
<ul>
<li><h3><a href="http://{url_title_path=how/portfolio}class=on">{title}</a></h3>
<p> {if segment_3 == url_title}<br />
{reverse_related_entries sort="asc"}<br />
<ul><br />
<li><a href="http://{url_title_path=how/project}class=on">- {title}</a></li><br />
</ul><br />
{/reverse_related_entries}<br />
{if:else}<br />
{/if}<br />
</li><br />
</ul><br />
{/exp:weblog:entries}<br />
</div><!--/end #right_sidebar-->I know that the “{if segment_3 == url_title}” won’t work for the project page as it does the portfolio page. But I can’t figure out how to check what weblog the project relates to as there is no identifier in the URL.