php - Returning an image cached image field in a Drupal 7 node template -


I have attached the icon for the categorization conditions and reference the word in the node:

< Code> field_accreditation_icon is the field on the taxonomic term is the field on the field_accreditation node.

The correct icon is displayed by placing it in node.tpl.php:

  & lt ;? Php $ term = taxonomy_term_load ($ node-> field_accreditation ['und'] [0] ['tid']); $ Result = field_view_field ('taxonomy_term', $ word, 'field_accreditation_icon'); Resonance render ($ result); ? & Gt;   

How do I present the icon as the image capture preset 'medium'?

Thank you!

You will need to get Yuri for that image, then create image URL with theme,

  & lt ;? Php // $ img_uri will print the image from the image printing Yuri value '& lt; Img src = "'.image_style_url (" medium ", $ img_uri).' '/ & Gt;';? & Gt;   

Using image uri By taxonomy_term_load ($ tid);

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -