15

The Tagadelic module works very well out of the box; it is the only plug-and-play feature for a tag cloud available for Drupal 7.

I do not need to use the "cloud" format. I need the tags to be shown as list, from the most popular to the least popular, rendered using the same font, style, and size.

How can Tagadelic be modified to achieve this? I guess it should require more than a CSS fix.
Is there any better option than Tagadelic?

1

3 Answers 3

14

You can do this with views:

  • create a view of terms
  • add a required relationship to "content using tags"
  • set use aggregation: yes
  • add the "term name" field a second time, set one of the to "aggregation type: count"
  • add "term name" as a sort criteria, set "aggregation type: count"

A sample view is at http://drupalbin.com/19467

5
  • I assume you have the Views Group By module installed for the aggregation.
    – Jan Tomka
    Commented Aug 11, 2011 at 23:47
  • 2
    Aggregation is built-in to Views 7.x-3.0! There's no need for the additional module.
    – Dylan Tack
    Commented Aug 11, 2011 at 23:51
  • Oh, too easy! ;-)
    – Jan Tomka
    Commented Aug 12, 2011 at 0:07
  • Thanks for the solution. Don't forget to filter by node published using the relationship (if you are geting weird results). Commented Jan 19, 2013 at 12:28
  • Nice take, take into account that if you try to select "count", it will make a count distinct, so you need to mark "Number" in the aggregation settings. That will effectively count the usage of the term, without looking for distinct (which will result in a count of 1 for every single term ever used that passes the filter).
    – versvs
    Commented Jul 16, 2015 at 10:16
2

Tagadelic actually does what you want, but then uses CSS to modify the list into a cloud.

All you need, is to override the CSS in your theme:

.wrapper.tagadelic {
  display: block;
  text-align : left;
  margin-right: 0;
}

.tagadelic.level1,
.tagadelic.level2,
.tagadelic.level3,
.tagadelic.level4,
.tagadelic.level5,
.tagadelic.level6,
.tagadelic.level7,
.tagadelic.level8,
.tagadelic.level9,
.tagadelic.level10 {
  font-size : 1em;
}
1

See the cctags module as an alternative.

flexible configuration and advanced features for theming clouds. (individual files of templates for tags, the names of the dictionary, pages clouds)

2
  • CCtags is producing this error: Deprecated function: Call-time pass-by-reference has been deprecated in _theme_process_registry() (line 413 of /home/sites/site01/drupal/includes/theme.inc). Deprecated function: Call-time pass-by-reference has been deprecated in _theme_process_registry() (line 413 of /home/sites/site01/drupal/includes/theme.inc). Any ideas? Thank you for your help
    – Jeremy
    Commented Jul 19, 2011 at 22:46
  • 1
    No idea. You'll have to hit the module's issue queue for further support on this I'm afraid.
    – user842
    Commented Jul 19, 2011 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.