0

Is there a way from a node--'type'.tpl.php template to remove the image style of an image field?

  • 5
    I think this is a duplicate of learning how to print out a field value for a field in a template (drupal.stackexchange.com/q/30063/42650). However more likely this should not even be done, and the image field should be configured with the appropriate formatter not not display as an image style instead. – mradcliffe Apr 21 '16 at 19:42
  • I don't understand how this could possibly be a duplicate of "how to print a field", but w/e – Shaylen Apr 22 '16 at 9:09
  • Because you want to render the raw value of a field? Also, it looks like the question is missing details about the implementation. The question is too broad. – mradcliffe Apr 22 '16 at 10:18
  • I never said I wanted to render the raw value of a field. My question only asks about "removing the image style" of an image field, so calling the function "render" will render it without applying the image style. Thought it would be clear, never mentioned "render" or anything related in my question. – Shaylen Apr 22 '16 at 11:26
0

I found it, in field.tpl.php.

$items[n]['#display_settings']['colorbox_node_style'] = "";

Not the answer you're looking for? Browse other questions tagged or ask your own question.