Conditional on total entries in a Tag Cloud
Posted: 14 March 2008 10:31 AM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  43
Joined  2006-12-07

I have a tag cloud that filters entries based on a category - I need to test for the total entries in the tag cloud and only display it if it is greater than a certain number.

Psuedo Code: If the total entries (articles tagged) in this tag cloud is greater than a certain number then display the tag cloud

here is the tag cloud code:

{exp:tag:cloud weblog="community|vacation" category="{segment_3}" groups="6" start="7" step="2"  websafe_separator="-"}
<a href="{path=topic/}{websafe_tag}" title="{tag_name}" style="font-size:{step}px;">{tag} </a>
{/exp:tag:cloud} 

I have looked at the variables available and can’t determine if any of them give you the total entries in the cloud.
I tried wrapping the cloud with a tag:entries tag and testing for “count” but that repeats the tags displayed multiple times..

Thanks for any help.

Profile
 
 
Posted: 14 March 2008 11:09 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8290
Joined  2006-10-18

I don’t think this is currently possible as there’s no Total Results variable for it. If it did exist though, you’d probably use code like this:

{if total_results "5"

I’ll submit this as a feature request smile

 Signature 
Profile
 
 
Posted: 14 March 2008 11:34 AM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  43
Joined  2006-12-07

Thanks - let me know if you come up with any workaround…

Profile
 
 
Posted: 17 October 2008 07:08 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8290
Joined  2006-10-18

This is now available with the new version of Tag 2.5 smile
http://www.solspace.com/forums/viewthread/661/

 Signature 
Profile