tag:related_entries behavior
Posted: 25 January 2008 03:36 PM   [ Ignore ]
Newbie
Rank
Total Posts:  4
Joined  2005-11-02

i’m having strange issues trying to list related entries. i’m using the latest build of the tag module.

if i use this method:

{exp:tag:related_entries weblog="weblog2" dynamic="off" limit="20" rank_limit "3" entry_id="{entry_id}"}
<a href="{url_title_path='stuff/weblog2'}">{title}</a><br />
{/exp:tag:related_entries}

i get a list of strange entries that have nothing to do with the original, and occasionally it will even include the entry i’m looking at (not always). but if i manually enter the entry_id i want to relate in the template such as:

{exp:tag:related_entries weblog="weblog2" dynamic="off" limit="20" rank_limit "3" entry_id="638"}
<a href="{url_title_path='stuff/weblog2'}">{title}/a><br />
{/exp:tag:related_entries}

everything works perfectly and i get expected results.

for the record i have several weblogs all with the same url titles so that may be throwing a wrench into things. does the weblog="” variable work in the related_entries tag?

edit: after playing around with it some more i noticed that entries with a unique url_title give expected results. entries that share an url_title with other blogs are hit-and-miss. it seems as though the weblog="” parameter is limiting the output of the tag properly but isn’t telling it to pull the original entry_id from that specific weblog.

Profile
 
 
Posted: 27 January 2008 07:16 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

Kevin,

I think your assessment is spot-on. The module is not coded to allow for duplicate url_titles. In general I consider this not the best practice on a site. But I can imagine cases where you might want to do this.

PieMan will add this to the enhancements list for Tag. For now I don’t have a solution for you.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 27 January 2008 12:27 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  4
Joined  2005-11-02

cool, thanks smile in the meantime i can just copy the same tags between weblogs and block the duplicate from displaying with a conditional

Profile