0

I know this is going to be a very easy answer, but I've been trying to build on someone else's code and am frustrated as hell. I need to link an image type node with a taxonomy term (or a couple terms) for categorizing them. The table is term_node and I just need to know how this table is populated, and how I can link a node (nid) with a term (tid).

When I go to mysite.com/categories/tags/tag_name I can view image nodes linked with that taxonomy term, but there was never a good interface built to add them and I'm not sure how they where added before. His code is a mess. I believe he may have used the Image Assist module, but I'm not sure.

I thought I should just be able to set the taxonomy when adding an image, but there is no such option when adding or editing the node.

1

why don´t you use the taxonomy image module then simply get the taxonomy id from the node (use node_load(nid) then identify with var_dump how can you refer to the taxonomy..he might be using the CCK or the taxonomy module ) then get the id(s) of the term, load that term with and see it´s image (again use var_dump to know it´s structure)

  • Thanks, and maybe I'm missing something, but I don't see how that helps. I did a var dump, but there's no useful information there. All I really need to know how to do is add an association between nid and tid on the term_node table in the Drupal frontend. I can do it in code, but I know there has to be some way to do it in Drupal. – Kyle Jan 31 '12 at 18:09

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.