Closed (fixed)
Project:
Drupal core
Version:
5.x-dev
Component:
taxonomy.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2007 at 19:38 UTC
Updated:
3 Mar 2008 at 09:32 UTC
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
Comment #1
RobRoy commentedThis 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.
Comment #2
ambrojio commentedHum, ok. Any pointers on which function controls that? Thank you, BTW.
Comment #3
RobRoy commentedCheck 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.
Comment #4
ambrojio commentedAwesome. RobRoy, FTW, again.
Comment #5
ambrojio commentedOK, 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.
Comment #6
scoutbaker commentedThe OP posted their solution, so marking this as fixed.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.