I'd like to display the taxonomic terms for nodes, but suppress the display of the tags created by Tagadelic. It appears, tho, that Tagadelic drops its tags into the $terms array for output. Is there any way to separate out the Tagadelic tags for display in a separate HTML object?

Comments

RobRoy’s picture

Project: Tagadelic » Drupal core
Version: master » 5.x-dev
Component: User interface » taxonomy.module

This is actually done by Drupal's taxonomy module. Tagadelic doesn't create any tags, just displays them. You have access to the full node object in your template.php, so you may want to search around on how to do that.

ambrojio’s picture

Hum, ok. Any pointers on which function controls that? Thank you, BTW.

RobRoy’s picture

Check out themes/engines/phptemplate.engine's phptemplate_page function. See how it grabs taxonomy_link into $terms? This comes from $node->taxonomy. Do a print_r($vars['node']->taxonomy) in your template.php's _phptemplate_variables('node') function to see how that is laid out by vocabulary. You can manually construct that to separate free tagging vocabs into a $vars['tags'] variable or something.

ambrojio’s picture

Awesome. RobRoy, FTW, again.

ambrojio’s picture

OK, so after a day or so of digging in code (of which I am only just beginning to grok), the solution is an administrative one, and painfully simple. But I thought I would post what we did in the hopes that it may be a useful lesson to other n00bs.

The core problem was that we wanted to freetag AND still be able to associate nodes with a predefined list of terms. We also only wanted users to navigate from nodes to other nodes with the predefined terms, as opposed to the freely created tags. So we realized that Tagadelic was wholly inappropriate, in that it's whole goal is to create useful tag clouds. So we just created a "Tagging" vocabulary, and set it to free tag. Then we created a view, and made it contextual based on the node, but only displaying terms from the predefined-term-vocabularies, and not the tagging vocabulary. This view was then inserted into the page (or it could easily go in a column in a block, or whatever). Oh, and the term associations display was conditionalized in node.tpl.php to only display when admins are logged in (so that they can track freetagging).

Simple and elegant, and I'm sure many will say "Duh, coulda told you THAT." But, still, maybe someone else will find this useful.

scoutbaker’s picture

Status: Active » Fixed

The OP posted their solution, so marking this as fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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