Help - Search - Members - Calendar
Full Version: Popular Tags List Not Working
Movable Type Community Forum > Using Movable Type > Categories and Entry Tags
J. Cormier
I have a very simple list of my site's top ten tags, by rank, on the front page of my site, like so:
CODE
<MTTags top="10">
<ul>
<li><a href="http://www.theaccidentalbard.com/tag/<$MTTagName encode_url="1" normalize="1"$>"><$MTTagName$></a></li>
</ul>
</MTTags>


My problem is that it has recently started displaying the tags in an incorrect order. When I first put it up, everything worked fine, but for some reason it suddenly stopped working. The order of the top ten seems to change depending on whether I use the top="10" modifier or if I manually use sort_by="rank" and limit="10". Neither of these configurations outputs the correct list of the most commonly used tags on my site anymore, however. I know this because I've looked at my tag info in the MT application itself.

The list begins with a short paragraph explaining tags on the site. As part of that description, I list the single most popular tag, which is "News." Then directly below that is the top ten list. So essentially it looks like this:

Popular Tags

The 10 most popular topics on the site right now, in descending order. The most popular topic right now is News.

1. Tag
2. Tag
3. Etc....


This requires two MTTags sections, one to display the number one tag in the sentence "The most popular tag right now is News" and another to make the list. Interestingly, the first section, the sentence, displays the number one tag correctly. The second does not. Any ideas?
J. Cormier
I solved the problem: for some reason the "top" modifier only works correctly when combined with sort_by="rank." For example:
CODE

<MTTags top="10" sort_by="rank">
Links here
</MTTags>

This works correctly, displaying the top ten most popular tags in descending order. Has anyone else had this problem? It seems like the "top" modifier doesn't work the way it was intended.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.