1

In Drupal 7 i have added a new taxonomy vocabulary, then added a new field (image field) into this vocabulary and terms with image (logo). In the content type i've added a new field (term reference). But in the node i can see only title of the taxonomy term. How i can insert imagefield into the node from taxonomy terms?

1

I've done something similar by using a template for the taxonomy term based on template suggestions. Personally I prefer writing theming functions though, and example for how to do this for a taxonomy field can be found in template.php of the default Bartik theme that comes with Drupal. Look for bartik_field__taxonomy_term_reference and here is the api documentation for theme_field().

You will need to install the devel module, which will give you a dump of the node object when you are viewing a node.

You will need to either theme the entire node with specific care taken to render the taxonomy how you want from the node object, alternatively you could just theme the actual term reference field (What I first mentioned and the best way imo.) These are instructions on using the devel module.

With that you will be able to dump the array or object relating to the taxonomy term and then create a template or function theming the field to your liking, as far as I know all the information is available there it's just getting it out of the object/array can be time consuming when you are doing it for the first time.

Overall the Drupal Theming Guide covers the finer details in a lot more detail than what can be kept to a reasonable answer here.

0

Following this Is it posible to use custom formater to display custom field of taxonomy term helped me a lot

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.