Related entries not showing up
Posted: 03 February 2008 08:55 AM   [ Ignore ]
Newbie
Rank
Total Posts:  2
Joined  2006-09-04

Hi there,

This is a pretty straightforward build but I must be missing something small or obvious (first time using Tag 2.0).

I have a page that shows the related tags at the bottom: project page

Here’s the code that’s pulling the tags:

{exp:tag:tags entry_id="{entry_id}" type="weblog" dynamic="off" backspace="2" orderby="clicks" sort="desc" limit="5"}
  
<a href="{path='projects/tags'}{websafe_tag}" title="{tag_name}">{tag}</a>,
{/exp:tag:tags}

On the resulting “related entries” page there are no related entries found, although from the Control Panel I can see that there are at least two entries (including the original entry) that the tag “arjen” is associated with. Here’s the code on the /projects/tags/ template:

First try (mine):

{exp:tag:related_entries weblog="projects" dynamic="off" limit="20" rank_limit "3" entry_id="{entry_id}"}
 {if no_results}No related entries were found
.{/if}
 
<a href="{url_title_path='projects'}">{title}</a>
{/exp:tag:related_entries}

Second try (from the documentation’s sample):

{exp:tag:related_entries weblog="projects" dynamic="off" limit="5" paginate="bottom" entry_id="{entry_id}"}
 
<h4><a href="{url_title_path='projects'}">{title}</a></h4>
 <
div class="related">
  <
h6>Related Entries</h6>
  
{if no_results}No related entries were found.{/if}
  {related_entries id
="related_field_name"}{title} {summary}|{/related_entries}
 
</div>
 <
div class="tags">
  
{exp:tag:tags entry_id="{entry_id}"}<a href="{path='tags/tag'}{websafe_tag}">{tag_name}</a{/exp:tag:tags}
 
</div>
 <
hr />
 
{paginate}{pagination_links}{/paginate}
{
/exp:tag:related_entries}

What am I missing here? Thanks for the help!

Profile
 
 
Posted: 04 February 2008 07:08 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3256
Joined  2006-10-18

storky,

The Tag:Related loop is used for displaying related Entries alongside of the related entry on a Permalink page.

I believe what you’re looking for is to use the Tag:Entries loop.
Currently, you have you tags linked to this page:

http://www.ejaedesign.com/elasticbrand/index.php/projects/tags/

This is the page that should have the Tag:Entries loop on it, NOT the Tag:Related loop smile

Secondly, your linking structure is incorrect wink

You are currently linking to is as:
http://www.ejaedesign.com/elasticbrand/index.php/projects/tags/arjen

It should be:
http://www.ejaedesign.com/elasticbrand/index.php/projects/tags/tag/arjen

The tag part of the URL path is NOT a template or anything, it’s only a trigger for the Tag:Entries loop smile

 Signature 
Profile
 
 
Posted: 06 February 2008 10:24 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  2
Joined  2006-09-04

Great! That was silly to miss the “releated_tag” vs. the usual tags:entries loop.
It looks like we got it now. Thanks!

Jae

Profile
 
 
Posted: 06 February 2008 11:12 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3256
Joined  2006-10-18

Awesome wink

 Signature 
Profile