Ok, I have created two new channels, a “client” and a “portfolio”.
Channel client has the following custom fields:
- website [text input]
(contains the customer URL)
- description [textarea]
(description about the client)
Channel portfolio has the following custom fields:
- company [relationship]
(related to client channel)
- description [textarea]
(description of the portfolio)
- keywords [Tagger module]
(list of tags)
- thumbnail [file]
- images [file]
Channel portfolio is also grouped to category group “portfolio”.
When I try to use related_entries or reverse_related_entries it doesn’t display anything.
Below you see the code part that I currently use to display the portfolio article:
{exp:channel:entries channel="portfolio" disable="member_data|pagination" url_title="{last_segment_absolute}"}
<div class="article group">
<h3>{title}</h3>
<p>{if pf_images != ""}<br />
<div class="pf-brand"><br />
{pf_images wrap="image"}<br />
</div><!-- !.pf-brand --><br />
{/if}<br />
<div class="pf-detail group"><br />
<div class="pf-info"><br />
{pf_description}<br />
</div><!-- //.pf-info --><br />
<div class="pf-related"><br />
</p><h4>U vindt meer van deze klant in</h4>
<p> <div class="nav"><br />
<ul class="fancy"><br />
{related_entries id="pf_company"}<br />
{categories}<br />
<li><span class="icon">»</span> <a href="http://{path=portfolio}">{category_name}</a></li><br />
{/categories}<br />
{/related_entries}<br />
</ul><br />
</div><!-- !.nav --><br />
</div><!-- !.pf-related --><br />
</div><!-- //.pf-detail.group --><br />
</div><!-- //.article --><br />
{/exp:channel:entries}
Where the related_entries starts there should be (or at least trying to) displaying list of categories which the current company is also listed in.
What am i doing wrong here.