I am using Hierarchical Select to save the term lineage in a single-hierarchy vocabulary titled "Products". Two types of nodes, product and design nodes, use this vocabulary. Products use the parent terms, like "Web > Website", and Designs typically use the lowest depth terms, like "Web > Website > Specific Design". I wanted to add NAT into the mix so that I could create a Product named "Specific Design" and immediately have the term available to be applied to designs.

As it is, this doesn't work out, because NAT creates a separate term at every depth of the vocabulary. When "Save Lineage" is selected in Hierarchical Select, it would be ideal for NAT to only create one new term, as a child of the deepest term currently selected. Alternatively, if the current functionality is still desired by someone (though I can't imagine a situation where it would be useful), perhaps an option could be made available on the NAT settings.

Comments

Zen’s picture

Category: bug » feature
Status: Active » Closed (won't fix)

This is something of a niche feature and unlikely to be generically useful. For your specific case, you could probably do this with a custom module and hook_nodeapi calls that modify nat / taxonomy.

smithn.nc’s picture

Ah well. You're probably right about this being a fairly specific need. I am curious though; can you think of any alternate scenarios where the current way would be preferable? Even if this is a rare case, it seems logical for one node to only create one term, even when the node's term lineage is being saved. Either way, thanks. I'll look into your API suggestion and the existing NAT code sometime to see if I can work a solution out.

Thank you again. :)

Zen’s picture

Category: feature » support

One node only creates one term. However, if you assign the "associated" vocabulary to the actual node type to denote hierarchy, it makes sense to allow multiple parents for the same term just like the taxonomy module. Actually, now that I reread your initial post, it appears that you believe that child terms with multiple parents in the same vocabulary are separate terms - this is not the case.

That said, the NAT module does, at the present moment, create duplicate terms if you have duplicate nodes with the same title.

If I've misunderstood your questions, please feel free to change the status accordingly.

Cheers,
-K

smithn.nc’s picture

Hi again! I reread your reply a couple times to make sure I understood what you were saying. I see now what you're referring to about the term having multiple parents. You're right. I was mistaken; I thought that the term at one level was different than the term at another level.

I still can't think of a situation where it would be useful to work this way, but as you said, it does mirror the way that the taxonomy module is handling things. When I originally started working with the taxonomy on this project, I had aimed to make a single-hierarchy taxonomy, both because of the job specs and because multiple-inheritance seemed to be strongly discouraged, as far as Drupal dev blogs/talks/etc went.

Anyway, thanks for clearing up my confusion on what was going on. I'll look into the suggestions you made earlier, to see about placing a new term only at the deepest level of the term hierarchy.

codi’s picture

Did you ever come up with a resolution to this problem. I too only want a NAT value at the deepest level of an HS vocab.

smithn.nc’s picture

@codi, in the end, I didn't have enough time to work out a solution. Instead I just stopped using Hierarchical Select. It's not as friendly for the users this way, but at least it works. =/