I just patched the module to show as a tag cloud dependencies of node references or better say for NodeReferrer fields.

Let's say i have two content types: 1. Article and 2. Topic. Where articles have node references to topic nodes. I want to show a tag cloud of the topics weighted on the amount of articles it was referenced.

I was thinking a lot about which module (views, noderefferer and views_cloud) to patch or if I should create a views_field_count module. But at the end it seems to be a problem to views' 2 architecture that it only allows real values from the db.
Noderefferer is not even a real value so it is based on proper functions (get_item_list()) called within the theme functions.

The easiest (fastest) solution was patching views_cloud. But this is an issue that should be solved in a more generic way.
For this reason this is probably a pretty lousy patch. But it could help others to get this common asked feature to work. That is why I uploaded it.

Maybe the module's maintainer has a better idea on how to resolve this issue.

CommentFileSizeAuthor
nodereferrer_count.patch1.55 KBxamanu

Comments

quicksketch’s picture

Category: feature » support
Status: Needs review » Fixed

I want to show a tag cloud of the topics weighted on the amount of articles it was referenced.

You can do this without a patch by setting up a relationship for "Content: Node Reference", then adding an argument for "Node: Nid". Then select the relationship you set up, and create a summary when no argument is passed in. This will have Views calculate the number of articles that are referenced to each node. Then you just need to set the summary style to "Cloud" and you're done.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.