15

I have found Tagadelic works very well out of the box and is, to my hours of research and knowledge, the only plug & play feature for a tag cloud available for Drupal 7.

This is the only problem I've run into--I want the functionality of Tagadelic but do not need it in the "cloud" format. I need my tag cloud to be in a list from most popular to least popular and no size variation. For example:

Item x
Item h
Item j
Item o
Item 4

Obviously the most popular item being 'Item x' and the least popular item being 'Item 4' How can Tagadelic be modified to this as I know it will require more than a CSS fix? Or is there a better option than Tagadelic?

13

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

  • I assume you have the Views Group By module installed for the aggregation. – Jan Tomka Aug 11 '11 at 23:47
  • 2
    Aggregation is built-in to Views 7.x-3.0! There's no need for the additional module. – Dylan Tack Aug 11 '11 at 23:51
  • Oh, too easy! ;-) – Jan Tomka Aug 12 '11 at 0:07
  • Thanks for the solution. Don't forget to filter by node published using the relationship (if you are geting weird results). – AlessMascherpa Jan 19 '13 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 Jul 16 '15 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)

  • 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 Jul 19 '11 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 Jul 19 '11 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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