How to link to different templates within same list of popular entries
Posted: 03 July 2009 10:40 PM   [ Ignore ]
Newbie
Rank
Total Posts:  18
Joined  2008-12-24

I’m trying to create a ‘Popular Today’ area on my homepage where the 5 most popular entries from multiple weblogs are listed with links to the entries.  How would I link to the entries which are each displayed within a different template?

I am using the following code, and it displays as I want but I can’t see how to make it link up correctly.

<div id="popular_now">
<
h1>Popular Today</h1>
<
ul>
{exp:tracker:entries weblog="news|bus_dir|event_cal" interval="today" limit="5"}
   
<li><a href="{tracker:url_title}" title="{title}">{tracker:title}</a></li>
{/exp:tracker:entries}
</ul>  
</
div

That code would generate a link like:
http://www.inthepanhandle.com/hospice_grief_support_for_teens

When the correct link should be:
http://www.inthepanhandle.com/index_10.php/news/article/hospice_grief_support_for_teens

That’s an example of a ‘News’ blog entry. While the next most popular item may be from the bus_dir weblog.
http://www.inthepanhandle.com/firebrand_media_llc

But should be:
http://www.inthepanhandle.com/index_10.php/business_directory/listing/firebrand_media_llc/

Any help would be appreciated.

Thanks,
Brad Hopkins

Profile
 
 
Posted: 06 July 2009 07:14 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10254
Joined  2006-10-18

Well, unfortunately Tracker cannot guess what the paths to your entries are supposed to be.
However, there is the {comment_url_title_auto_path} variable which should work in your case smile

<div id="popular_now">
<
h1>Popular Today</h1>
<
ul>
{exp:tracker:entries weblog="news|bus_dir|event_cal" interval="today" limit="5"}
   
<li><a href="{tracker:comment_url_title_auto_path}" title="{title}">{tracker:title}</a></li>
{/exp:tracker:entries}
</ul>
</
div
 Signature 
Profile
 
 
Posted: 15 July 2009 12:24 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  18
Joined  2008-12-24

Thanks! Worked like a charm.
Brad Hopkins

Profile
 
 
Posted: 28 October 2009 12:22 PM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  25
Joined  2009-04-09

I’m using Tracker for the first time

I have to find a way to link the articles without using the commnent_url_auto_path

{exp:tracker:entries weblog="articles_magazine" limit="5" status="featured_top_story|open" interval="month" custom_fields="mag_extrait"}
   
<li>[{tracker:total_views}] <a href="{[i]tracker:url_title[/i]}">{tracker:title}</a>{tracker:field:mag_extrait}</li>
{/exp:tracker:entries} 
Profile
 
 
Posted: 28 October 2009 03:10 PM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRank
Total Posts:  942
Joined  2009-10-27

Hi pab,

Thank you for contacting us. Someone will get back to you shortly. smile

 Signature 
Profile
 
 
Posted: 28 October 2009 06:52 PM   [ Ignore ]   [ # 5 ]
Newbie
Rank
Total Posts:  25
Joined  2009-04-09

looking forward to it

Thanks

smile

Profile
 
 
Posted: 28 October 2009 10:47 PM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  25
Joined  2009-04-09

Found an answer

thanks.

<h4>[{tracker:total_views}] <a href="{path=">{tracker:title}</a></h4
Profile